Welcome to WebmasterWorld Guest from 54.162.239.134

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Sign Up Notification For Gmail Says "If you need he! lp"

     
10:50 am on Dec 9, 2008 (gmt 0)

5+ Year Member



I have a strange problem. I have a small program which sends a sign-up notification mail which has an url to authenticate the user. Everything is OK, the only problem is in a particular line where there appears a '! ' mark for a particular mail provider which is gmail. The line says "If you need he! lp" and we are trying to write "If you need help". For all other mail providers this bug is not applicable.

I have frantically checked for the occurrence of that '! ', but could not find any in my program. Can anyone please shed some lights as to whats wrong here.

10:03 pm on Dec 10, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can you post the code here?
5:39 am on Dec 29, 2008 (gmt 0)

5+ Year Member



Ok. Here is the code snippet:

$sender = "test\@example.com";

my $message = '';

$message .= "We appreciate your interest in the 123greetings Studio. If you have any questions or need any help, please contact us by email at ";
$message .= "<a href=mailto:" . $sender . ">test@example.com.</a><br><br>";
$message .= "Enjoy your stay with us!" . "<br><br>";

my $msg = MIME::Lite->new(
From => $sender,
Reply-To => $sender,
To => $userMail,
Subject => "Thank You",
Type => 'multipart/mixed'
);

$msg->attach(
Type =>'text/html',
Data => qq($message)
);

my $mail = $msg->as_string;

$smtp = Net::SMTP_auth->new('mail.somesmtp.com',Port=>1234);
$smtp->auth('#*$!x', '#*$!#*$!x', '#*$!#*$!xx');

$smtp->mail('postmaster@example.com');
$smtp->to($userMail);

$smtp->data();
$smtp->datasend($mail);

6:10 am on Dec 29, 2008 (gmt 0)

WebmasterWorld Senior Member vincevincevince is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Not sure if it will fix the problem; but you can simplify your code somewhat by using this syntax to avoid the new Net::SMTP_auth. By avoiding using ->as_string method it may, purely by chance, reduce or change the processing and fix the bug.

MIME::Lite->send('smtp', $host, Timeout=>60
AuthUser=>$user, AuthPass=>$pass);
5:12 pm on Dec 29, 2008 (gmt 0)

5+ Year Member



There is a problem in the code here:


$message .= "<a href=mailto:" . $sender . ">test@example.com.</a><br><br>";

The @ symbol needs to be escaped: \@

Not sure if that has anything to do with the problem but it does need to be fixed otherwise the link text will be broken although the actual link should still work ($sender).

Its also a little confusing why you are using MIME::Lite to construct the email but then use NET::SMTP to send the email. Just use MIME::Lite for the entire process.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month