Thanks for looking!#!/usr/bin/perl use strict; use warnings; use autodie qw(open close); use CGI qw(-oldstyle_urls :standard); use CGI::Carp qw(fatalsToBrowser); use MIME::Lite; use POSIX qw/strftime/; my $date = strftime "%m/%d/%Y", localtime; print header(); send_reg_email( first_name => 'Joe', last_name => 'Doe', ); sub send_reg_email { my (%args) = @_; my $first_name = $args{first_name} || ''; my $last_name = $args{last_name} || ''; my $e_from = 'Form Registration <myemail@test.com>'; my $e_to = 'Form Support <myemail@test.com>'; my $msg = MIME::Lite->new( From => $e_from, To => $e_to, Subject => "Registration", Type => 'multipart/related') or die "Error Creating Message +: $!\n"; $msg->attach( Type => 'text/html', Data => qq| <html> <head> <meta http-equiv="Content-language" content="en-gb" /> <title>Registration Email</title> <style type="text/css"> html { margin:0; padding:0; } body { padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; font-family:arial,helvetica; font-size: 14px; color:#808080; } .etext { font-family:arial,helvetica; font-size: 14px; color:#A1A1A1; } </style> </head> <body bgcolor="#1A1A1A"> <table width="100%" border="0" bgcolor="#1A1A1A" cellpaddin +g="0" cellspacing="0"> <tr> <td bgcolor="#1A1A1A" width="100%"> <table width="100%" border="1" bgcolor="#1A1A1A" cellp +adding="0" cellspacing="0"> <tr> <td bgcolor="#1A1A1A" width="125" height="47"><im +g src="cid:logo" width="212" height="98" border="0" /> </td> </tr> </table> </td> </tr> <tr> <td align="left"> <table width="100%" border="0" bgcolor="#1A1A1A" cell +padding="0" cellspacing="0"> <tr> <td bgcolor="#1A1A1A" width="100%" height="" align +="left"> </td> </tr> <tr> <td bgcolor="#1A1A1A" width="100%" height="" align +="left"><div class="etext"> <font color="#A1A1A1">Registra +tion Information</font></div></td> </tr> <tr> <td bgcolor="#1A1A1A" width="100%" height="" align +="left"> </td> </tr> <tr> <td bgcolor="#1A1A1A" width="100%" height="" align +="left"><div class="etext"> <font color="#A1A1A1">Name: $f +irst_name $last_name</font></div></td> </tr> <tr> <td bgcolor="#1A1A1A" width="100%" height="" align +="left"> </td> </tr> <tr> <td bgcolor="#1A1A1A" width="100%" height="" align +="left"> </td> </tr> </table> </td> </tr> <tr> <td align="left"> </td> </tr> </table> </body> </html> |, ); # Attach GIF image $msg->attach( Type => 'image/png', Id => 'logo', Encoding => 'base64', Path => '../images/logo.png'); $msg->send(); } # end mail sub print "<br>DONE<br>";
In reply to Sending email Help! by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |