##sendmail_email.pl #!C:/Perl/bin/perl -w use CGI qw(:standard); use HTML::Entities; use Mail::Sendmail 0.79; # doesn't work with v. 0.74! my $Recipient=param('Recipient'); my $Sender=param('Sender'); my $bcc_list=param('bcc_list'); my $Subject=param('Subject') my $Message = param ('Message'); $html = <$Message

END_HTML my %mail; $mail{Smtp}="smtp.sendgrid.net"; $mail{Port}=587; $mail{Auth}={user=>"Milt1", password=>"XXXXXXX", method => "LOGIN", required => 1}; $mail{To}=$Recipient; $mail{From}= $Sender; $mail {bcc}="$bcc_list"; $mail{Subject}=$Subject; $mail{'content-type'} = 'text/html; charset="iso-8859-1"'; $mail{body} = <$html END_OF_BODY sendmail(%mail) || print "Error: $Mail::Sendmail::error\n"; &redirect; sub redirect { print header(), start_html; print "Your Message Was Sent\n\n"; } exit; #### my@=<$Email>; if (@a) { foreach $Address(@a) { $Recipient=$Address; } }