homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

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

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

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)

Can you post the code here?


 5:39 am on Dec 29, 2008 (gmt 0)

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'

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');




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

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)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved