neverminda has asked for the wisdom of the Perl Monks concerning the following question:
How can I disguise the sender's email address with MIME::Lite?sub sendmail { my $server = 'emailserver.com'; my $from = 'myemail@emailserver.com'; my $disguise = 'mygmail@gmail.com'; my $to = $_[0]; my $subject = $_[1]; my $body = $_[2]; use MIME::Lite; my $msg; $msg = MIME::Lite -> new( From => $from, To => $to, CC => $from, Subject => $subject, Type => 'text/html', Data => qq{$body} ); if(not $msg ->send('smtp', $server, Timeout => 60, Debug => 1)){ die "Can not send the message.\n"; } }
I am trying to let the email recipient see my mygmail@gmail.com as the sender' address instead of the myemail@emailserver.com who sends the email. I have to use myemail@emailserver.com in the "From" because the emailserver.com requires the sender's email must be in the server's private list.
I know I can disguise it using Net::SMTP easily, but Net::SMTP does not support html email as far as I know.
Disclaimer: I'm not trying to spam anybody using email. I just need to use this function so that recipient can reply to the right email address.
Any help will be appreciated!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to disguise sender's email address with MIME::Lite?
by bobf (Monsignor) on Jun 12, 2007 at 02:49 UTC | |
|
Re: How to disguise sender's email address with MIME::Lite?
by clinton (Priest) on Jun 12, 2007 at 13:43 UTC | |
| |
|
Re: How to disguise sender's email address with MIME::Lite?
by sago (Scribe) on Jun 12, 2007 at 08:28 UTC | |
by neverminda (Novice) on Jun 12, 2007 at 13:08 UTC |