jmingo
asked on
SENDMAIL: Adding a "! " to my email ?!????!?
I'm sending an email using sendmail, and it mysteriously and randomly seems to place an exclamation mark and then a space or two ("! ") in the link URL, link, or doesn't end the a href tag where it should (will end at the end of the message sometimes). Here is the code i am using, any ideas what could be causing this??
Thanks
__________________________ __________ __________ ____
$r=time . '.' . $$ ;
my @mailnames=split(/ *, */,$email) ;
foreach(@mailnames) {
$link = CGI::escapeHTML($link);
#INSERT INTO DATABASE
$link = CGI::unescapeHTML($link);
$emaillink = "http://www.server.com/test.html?id=$r";
$emaillinklow = "http://www.server.com/test.html?id=$r&highspeed=no";
my $message;
$message = "<html><head><title>test</ title></he ad><style type=\"text/css\">body, td, input, select, textarea { font-size: 13px; font-family: Trebuchet MS, Verdana, Arial, Sans-Serif; }</style><body bgcolor=#FFFFFF marginwidth=0 marginheight=0 leftmargin=0 topmargin=0><table border=0 cellpadding=0 width=600 cellspacing=0><tr><td valign=top align=left><img src=\"http://www.server.com/images/$background.jpg\"></td></tr><tr><td valign=top align=left><table border=0 cellpadding=3 cellspacing=3><tr><td align=left valign=top>$newemailconten t<br><br>< a href=\"$emaillink\"><b>$li nk</b></a> <br><a href=\"$emaillinklow\"><b> $link - For Dial-up</b></a><br><br>$ne wsignature </body></h tml>";
open(SENDMAIL, "|$sendmail -t") || die "Unable to open sendmail";
print SENDMAIL "to: $_\n";
print SENDMAIL "from: $fromname <$fromemail>\n";
print SENDMAIL "Reply-to: $fromname <$fromemail>\n";
print SENDMAIL "Return-Path: $fromemail\n";
print SENDMAIL "MIME-Version: 1.0\n";
print SENDMAIL "subject: $subject\n";
print SENDMAIL "Content-Type: text/html; charset=us-ascii\n\n";
print SENDMAIL $message;
print SENDMAIL "\n\n";
close(SENDMAIL);
}
Thanks
__________________________
$r=time . '.' . $$ ;
my @mailnames=split(/ *, */,$email) ;
foreach(@mailnames) {
$link = CGI::escapeHTML($link);
#INSERT INTO DATABASE
$link = CGI::unescapeHTML($link);
$emaillink = "http://www.server.com/test.html?id=$r";
$emaillinklow = "http://www.server.com/test.html?id=$r&highspeed=no";
my $message;
$message = "<html><head><title>test</
open(SENDMAIL, "|$sendmail -t") || die "Unable to open sendmail";
print SENDMAIL "to: $_\n";
print SENDMAIL "from: $fromname <$fromemail>\n";
print SENDMAIL "Reply-to: $fromname <$fromemail>\n";
print SENDMAIL "Return-Path: $fromemail\n";
print SENDMAIL "MIME-Version: 1.0\n";
print SENDMAIL "subject: $subject\n";
print SENDMAIL "Content-Type: text/html; charset=us-ascii\n\n";
print SENDMAIL $message;
print SENDMAIL "\n\n";
close(SENDMAIL);
}
looks like the same question you posted before. Close your other threads if that's the case, if not what is new abiut the problem? Nobody really answered before because this does not appear to have anything to do with perl. There is no reason I can think of why perl would insert random-ish characters.
You might also attract more attention if the answer were worth 500 points.
ASKER
could peoples email clients/systems possibly be doing something to it do you suppose?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also take a look at: http://www.systemwebmail.com/faq/4.4.5.aspx
ASKER
clockwatcher: i think that might be it.... thanks a lot!! i will fix that.