By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,710 Members | 1,970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,710 IT Pros & Developers. It's quick & easy.

Sending mail problem

P: 89
I tried a very simple mail script to send mail as below:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. use Mail::Send;
  3.  
  4. $body = "This is the body of the message"; 
  5. #-- initialize the object
  6. $msg = new Mail::Send Subject=>'example subject', To=>'xyz@hotmail.com'';
  7.  
  8. #-- launch mailer and set headers
  9. $fh = $msg->open;
  10.  
  11. #-- print the message body
  12. print $fh "Hello,\n";
  13. print $fh "$body\n";
  14.  
  15. #-- complete the message and send it
  16. $fh->close;
And it works fine. When I try to change the 'TO" address to "xyz@mailman...domainname', it is giving me an error as below. And am not able to deliver the mail to the respective list. Please let me know whether I need to use any other perl module inorder to deliver to a list handled by mailman. I am not sure about it as I didn't set up mailman service. The error is as below. I see this in the mbox of linux server.
Expand|Select|Wrap|Line Numbers
  1.  Real domain name required for sender address
Sep 12 '08 #1
Share this Question
Share on Google+
1 Reply


numberwhun
Expert Mod 2.5K+
P: 3,503
That sounds like it could be a couple things:

1. You aren't using a valid email address that exists
2. The mailman server is setup wrong

Either way, I am not sure its your code. Again, its complaining about the email address.

Regards,

Jeff
Sep 12 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.