Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Perl Sendmail

PERL SENDMAIL generating unwanted exclamation mark !



6:16 pm on Oct 6, 2004 (gmt 0)

10+ Year Member

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?


9:08 pm on Oct 6, 2004 (gmt 0)

10+ Year Member

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;


11:14 am on Oct 8, 2004 (gmt 0)

10+ Year Member

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!


2:34 pm on Oct 8, 2004 (gmt 0)

10+ Year Member

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.


8:22 pm on Oct 20, 2004 (gmt 0)

10+ Year Member

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.

[wdb1.sco.com ]


Featured Threads

Hot Threads This Week

Hot Threads This Month