how can i add image and hyperlink to an email in perl using sendmail?
this is the body that i want in the $message (variable):
your file : filename.jpg
(add image here inline)
has been proccess you can find it at: add link here `
here is my code:
sub sendEmail
{
my ($to, $from, $subject, $message) = @_;
my $sendmail = '/usr/lib/sendmail';
open(MAIL, "|$sendmail -oi -t");
print MAIL "From: $from\n";
print MAIL "To: $to\n";
print MAIL "Subject: $subject\n\n";
print MAIL "$message\n";
close(MAIL);
}
sendEmail($receiver, 'admin, 'your file has been Synchronized', $message);
You probably need to use a Perl module that allows you to create MIME attachments. There should be a bunch on CPAN, for example, MIME::Lite. See a discussion at:
http://www.revsys.com/writings/perl/sending-email-with-perl.html