Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $content = get( "http://pagetest.html" ) or die $!; my @mailto; $mailto[0]="ok1\@ok.com"; $mailto[1]="ok2\@ok.com"; $mailto[2]="ok3\@ok.com"; foreach my $element (@mailto) { my $sock = IO::Socket::INET->new (PeerAddr => 'my.mail.server.ip', Type =>'Content-type: text/html; charset=us-ascii' +, PeerPort => 'smtp(25)', Proto => 'tcp')|| die "That sucks, I can't open a +port on the mail server. I'm going to take all my toys and go home no +w.."; my $input = <$sock>; print $sock "HELLO localhost\r\n"; $input = <$sock>; print $sock "mail from:master-ok\@ok.com\r\n"; $input = <$sock>; print $sock "rcpt to:$element\r\n"; print "rcpt to:$element\r\n"; $input = <$sock>; print $sock "DATA\r\n"; print $sock "Subject: Hell is breaking loose!"; print $sock "From: Server Hell\r\n"; print $sock "To: $element\r\n"; print $sock "\r\n"; print $sock "$content\r\n"; print $sock ".\r\n"; $input = <$sock>; print $sock "QUIT"; close ($sock); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sending HTML e-mail
by jeffa (Bishop) on Dec 26, 2003 at 15:24 UTC | |
by rbholder (Initiate) on Nov 06, 2014 at 17:21 UTC | |
by jeffa (Bishop) on Feb 05, 2015 at 17:59 UTC | |
|
Re: Sending HTML e-mail
by tcf22 (Priest) on Dec 26, 2003 at 15:19 UTC | |
by Anonymous Monk on Dec 30, 2003 at 00:26 UTC | |
|
Re: Sending HTML e-mail
by exussum0 (Vicar) on Dec 26, 2003 at 15:51 UTC | |
|
Re: Sending HTML e-mail
by pijush (Scribe) on Dec 27, 2003 at 10:43 UTC |