Thanks - I'll try and review it tomorrow....
I'm a bit surprised about you not needing the fake_from field - but then that allows for the email from to be totally different from the SMTP from field - and in our case it isn't - it's a case of :
SMTP FROM = "us...@do..."
Email FROM = "Mr User <us...@do...>"
And clearly the library is extracting the us...@do... from it as appropriate.
Is there any benefit to us keeping the data separate - i.e. using from and fake_from? Does it give us more "protection" against someone trying to be clever and entering a 'real_name' as e.g. <ra...@ex...> ?
I used this for testing :
#!/usr/bin/perl -w
use Mail::Sender;
%mail = ( to => 'da...@pa...',
from => 'Bob Jangles <da...@pa...>',
msg => "whatever",
subject => 'meh meh',
);
%smtp = (
'smtp' => 'localhost',
'from' => 'me...@me...',
on_errors => 'die',
);
$body = 'whatever';
eval {
my $sender = new Mail::Sender { %smtp } ;
$sender->Open({%mail});
$sender->SendLineEnc($body);
$sender->Close() or die($sender->{'error_msg'});
};
if($@) {
die("pants : $@\n");
}
thanks,
David.
On 25 May 2012, at 00:38, Jan Kruis wrote:
> updated realname patch
>
> regrade Jan
|