in reply to Re: Still New to Perl / html email
in thread Still New to Perl / html email
I like to test things via command line before doing them in a script though. So, what I did to test this out was I actually sent a message out via command line.X-Mailer: MSN Explorer 6.00.0010.0912 X-OriginalArrivalTime: 23 Mar 2001 23:59:19.0685 (UTC) FILETIME=[4675A +B50:01C0B3F5] X-UIDL: 281293976 <-- set by the POP server
With sendmail you can basicly write some of your own headers which is what I did. After the headers were properly written for the MUA to interpret the HTML, I simply write the html. Thats it. In perl it should be the same way:[ notjamesnjkwan ~ ] $ cat << msg | sendmail jconner@fake_domain.com > Mime-Version: 1.1 > Content-type: text/html > Subject: This is a test for html > <font color=blue>Line in blue</font><br> > <font color=red>Line in red</font> > . > msg
I haven't actually tried the \r\n's in a single line yet but I see no reason why they shouldn't work :)open(PIPE,"| /usr/lib/sendmail $RCPT"); print PIPE "Mime-Version: 1.1\r\nContent-type: text/html\r\n"; print PIPE "Subject: $SUBJECT\r\n"; print PIPE "message here with HTML embedded\r\n.\r\n"; close(PIPE);
- Jim
|
|---|