Is there a way to format Mailer.pm to send mail in HTML format, or in the alternative, how actually do you go about sending HTML formatted mail?
Check out one of the recent Threads in the Forum that provides codes for doing this.
Regards.
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------
Regards.
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------
Go here:
http://www.gossamer-threads.com/scripts/forum/resources/Forum8/HTML/000921.html
You can use the codes in it within your SMTP routines you have in your scripts.
Regards.
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------
http://www.gossamer-threads.com/scripts/forum/resources/Forum8/HTML/000921.html
You can use the codes in it within your SMTP routines you have in your scripts.
Regards.
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------
Dec 24, 1999, 11:45 AM
User (154 posts)
Dec 24, 1999, 11:45 AM
Post #6 of 9
Views: 4756
OK, I took the information provided in the threads and gave it a shot ... to no avail.
Here is my code:
open (MAIL, "|$mailprog -t")
| | print "Can't start mail program";
print MAIL "To: $name\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n";
print MAIL "MIME-Version: 1.0\n";
print MAIL "Content-Type: text/html; charset=us-ascii\n";
print MAIL "Content-Transfer-Encoding: 7bit\n";
print MAIL "Content-Disposition: inline; filename=newsletter.html\n";
print MAIL "Content-Base: http\:\/\/www.mydomain.com\/data\/newsletter\/\n";
close (MAIL);
Can anyone tell what I am doing wrong? I know the mail program is configured properly because text files get sent with no problem.
Thanks for your help. Merry Christmas!
Here is my code:
open (MAIL, "|$mailprog -t")
| | print "Can't start mail program";
print MAIL "To: $name\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n";
print MAIL "MIME-Version: 1.0\n";
print MAIL "Content-Type: text/html; charset=us-ascii\n";
print MAIL "Content-Transfer-Encoding: 7bit\n";
print MAIL "Content-Disposition: inline; filename=newsletter.html\n";
print MAIL "Content-Base: http\:\/\/www.mydomain.com\/data\/newsletter\/\n";
close (MAIL);
Can anyone tell what I am doing wrong? I know the mail program is configured properly because text files get sent with no problem.
Thanks for your help. Merry Christmas!
Change the following codes:
TO THE FOLLOWING:
Then in your $mailprog variable, use the following:
You may have to change the sendmail path to what you have on your server.
Also, the codes you have are for SENDMAIL not SMTP or Sockets that the Mailer.pm uses. You need to have SENDMAIL program on your server for the codes you have posted to use.
Hope this helps.
Regards,
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------
Code:
open (MAIL, "|$mailprog -t")TO THE FOLLOWING:
Code:
open (MAIL, "$mailprog")Then in your $mailprog variable, use the following:
Code:
$mailprog = "|/usr/local/bin/sendmail -t -oeq";You may have to change the sendmail path to what you have on your server.
Also, the codes you have are for SENDMAIL not SMTP or Sockets that the Mailer.pm uses. You need to have SENDMAIL program on your server for the codes you have posted to use.
Hope this helps.
Regards,
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------
Jan 3, 2000, 7:49 AM
User (195 posts)
Jan 3, 2000, 7:49 AM
Post #8 of 9
Views: 4764
It appears that people are having trouble understanding what is going on here. It is my fault. Here is the code to make this work. I only displayed the header info, and not including the perl syntax.
open(MAIL, "|$mailprog -t -oeq") | | die "Can't open $mailprog!";
print MAIL "From: Your Name<you@YourDomain.com>\n";
print MAIL "To: Recipient Name <them@Theirs.com>\n";
print MAIL "Subject: test message\n";
print MAIL "MIME-Version: 1.0\n";
print MAIL "Content-Type: text/html; charset=us-ascii\n";
print MAIL "Content-Transfer-Encoding: 7bit\n\n";
Hope that clears things up.
Regards
[This message has been edited by Chris071371 (edited January 03, 2000).]
Code:
$mailprog = "/path/to/sendmail"; open(MAIL, "|$mailprog -t -oeq") | | die "Can't open $mailprog!";
print MAIL "From: Your Name<you@YourDomain.com>\n";
print MAIL "To: Recipient Name <them@Theirs.com>\n";
print MAIL "Subject: test message\n";
print MAIL "MIME-Version: 1.0\n";
print MAIL "Content-Type: text/html; charset=us-ascii\n";
print MAIL "Content-Transfer-Encoding: 7bit\n\n";
Hope that clears things up.
Regards
[This message has been edited by Chris071371 (edited January 03, 2000).]