Re: Problem creating envelope-from in module Email::Send



Ralph wrote:
P.S.: Grr, is there a good reason why coders choose this complicated
sub-class-concept so often instead of just offering an 'easy to use'
parameter??

Good question.

As regards sending emails, my favorite module is Mail::Sender. It's a well working module without dependencies, and after seeing the struggle in this thread with specifying an envelope sender, I'm even more convinced that I'll keep using Mail::Sender.

A code example:

use Mail::Sender;

ref (new Mail::Sender -> MailMsg( {
smtp => 'localhost',
fake_from => 'Somebody <somebody@xxxxxxxxxxx>',
from => 'somebodyelse@xxxxxxxxxxx', # envelope sender
to => 'John Smith <john.smith@xxxxxxxxxxx>',
subject => 'Test',
msg => "Just a test...\n",
} )) or die "Cannot send mail: $Mail::Sender::Error\n";

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
.