Welcome to WebmasterWorld Guest from 18.104.22.168 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
Perl Sendmail PERL SENDMAIL generating unwanted exclamation mark ! tonyphipps
I have a perl script that uses sendmail to send various emails from the web site, and that works fine, except for one message that's slightly longer than the rest - and for that - sendmail is inserting an exclamation mark randomly (within about 10 characters).
It's an HTML formatted email (print SENDMAIL "Content-Type: text/html; charset=\"iso-8859-1\"\n\n";), but only has a few bold, and one URL link in it - and is 962 characters long - with spaces - and I'll always get a! inserted at around character 780.
Any suggestions anyone?
Below is how we do it and don't seem to have a problem. If you continue to experience problems you might want to run Perl with the -w switch to see what warnings the script is generating. Good luck:
open (MAIL, "¦ $mailprog -t");
print MAIL "Content-Type: text\/html\; print MAIL "To: $email\n"; print MAIL "From: $listmail\n"; print MAIL "Subject: $subject\n\n"; print MAIL $message; close MAIL; tonyphipps
Thanks for your reply.
This is exactly what I'm using! I am unable to run PERL with the -w switch which causes a server error (remote hosting)!
I've seen one other post on this subject - but their discussion related to PHP, and they talk of adding a line feed at the end of the e-mail - I even tried that!
You run Perl with the -w switch specifically to find errors. Take a look at the server's error log and see what the error is and then you can fix it. badtzmaru
I am not sure what the rules for urls in this forum is, but here is an url where the issue and resolution is described.