Hey everyone. I have a problem with MIME::Lite I'm hoping someone can help me with. Searched Google, here, asked on IRC, no one seems to have the problem much less the solution :).
I'm using MIME::Lite, I've used it extensively in the past without a problem, but now on a particular program, it seems to ignore the From header that I specify and instead show my messages as coming from 'nobody@myserver.com'
Here's the code, almost the same as the docs with just some minor differences for my own variables
my $msg = MIME::Lite->new( From =>$CONFIG{submit_by}, To =>$CONFIG{submit_to}, Subject =>$CONFIG{subject}, Type =>'TEXT', Data =>$message, ); if($CONFIG{SENDMAIL}) { MIME::Lite->send("sendmail","$CONFIG{SENDMAIL} -t"); } elsif($CONFIG{SMTP_SERVER}) { MIME::Lite->send("smtp",$CONFIG{SMTP_SERVER},Timeout=>30); } else { # Yikes! No send method specified. Abort croak "No send method specified.\n"; } $msg->send();
I've verified that my %CONFIG has the information it needs to work including an email address in the 'submit_by' but all the messages I receive from it have 'nobody' as the sender. I've tried sending this both through my sendmail installation and through a remote SMTP server (postfix) with the same results. Anyone have any ideas?
Thanks
In reply to MIME::Lite From header problem by cfreak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |