neilwatson has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use warnings; use Mail::Sender; my $sender = new Mail::Sender {smtp => 'localhost'}; $sender->OpenMultipart({ from => 'marketing@mydomain.foo', to => 'marketlist@mydomain.foo', subject => 'we are so great!', type => 'multipart/related' }); $sender->Attach({ description => 'html body', ctype => 'text/html; charset=us-ascii', encoding => '7bit', disposition => 'NONE', file => 'mes.html' }); $sender->Attach({ description => 'vici gif', ctype => 'image/gif', encoding => 'base64', disposition => "inline; filename=\"VICI.gif\";\r\nContent-ID: <img +1>", file => 'VICI.gif' }); $sender->Close;
I've had limited success with this. Some email clients receive the html and image in the body others (Outlook) receive both as attachments. Is there a way I can ensure that the html and images will come in the message body?
Thanks,
Neil Watson
watson-wilson.ca
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sending HTML Mail
by gav^ (Curate) on May 03, 2002 at 20:00 UTC | |
|
Re: Sending HTML Mail
by Dog and Pony (Priest) on May 03, 2002 at 20:00 UTC | |
by neilwatson (Priest) on May 03, 2002 at 21:13 UTC | |
by Fastolfe (Vicar) on May 04, 2002 at 16:20 UTC |