Welcome to WebmasterWorld Guest from 107.21.163.40

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)

New User

10+ Year Member

joined:Oct 6, 2004
posts:5
votes: 0


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)

New User

10+ Year Member

joined:Sept 13, 2004
posts:27
votes: 0


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)

New User

10+ Year Member

joined:Oct 6, 2004
posts:5
votes: 0


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)

Junior Member from US 

10+ Year Member

joined:Nov 30, 2002
posts:162
votes: 0


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)

Junior Member

10+ Year Member

joined:Nov 21, 2003
posts:86
votes: 0


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 ]