cfreak has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MIME::Lite From header problem
by mifflin (Curate) on Jul 23, 2004 at 18:42 UTC | |
|
Re: MIME::Lite From header problem
by chanio (Priest) on Jul 23, 2004 at 17:24 UTC | |
by cfreak (Chaplain) on Jul 23, 2004 at 18:29 UTC |