Hey guys,

 

I am having a small problem trying to send an email to XMail from a perl
script, here is the code:

 

#!/usr/bin/perl -w

use Net::SMTP;

$smtp = Net::SMTP->new('smtp.mydomain.com', Hello =>
'myserver.mydomain.com', Timeout => 60);

$smtp->mail([email protected]');

$smtp->to('[email protected]');

$smtp->data();

$smtp->datasend("From: [email protected]\n");

$smtp->datasend("To: [email protected]\n");

$smtp->datasend("Subject: Test 1\n");

$smtp->datasend("\n");

$smtp->datasend("A simple test message\n");

$smtp->dataend();

$smtp->quit;

 

XMail refuses the email :

"mail"  "mail"  "myserverip"  "2009-08-24 13:31:08"
"myserver.mydomain.com" ""      "[email protected]"  ""      ""
"SNDR=ESYNTAX"      ""      "0"     ""

 

 

I understand that @ must be escaped, but how do we tell Perl to send the
string without the \ ?

 

This might be a real noob problem, I don’t know anything about perl.

 

 

Thanks for help,

 

-fred

_______________________________________________
xmail mailing list
[email protected]
http://xmailserver.org/mailman/listinfo/xmail

Reply via email to