Octavian Râsnita wrote:
From: "Gunnar Hjalmarsson" <nore...@gunnar.cc>
however until that new module will be ready... I need to use Email::Send, because it allows sending in many ways, using SMTP, Sendmail, Qmail, Google and a few others.

Why is it important to have a mail sending module hunt for various mailer programs?

It is important because some users might want to use Sendmail, some Qmail, some an SMTP server, some Gmail or other methods. The best email client would need to be able to use any method.

Everyone must use an SMTP server. How many are really interested in what happens behind the scenes between the module and the server, as long as it works?

Mail::Sender doesn't encode the headers to UTF-8 and we would need to do that MIME encoding explicitly which is something I wouldn't like.

<snip>

Then Mail::Sender ... doesn't encode the body of the message to UTF-8 and we would need to do it explicitly.

Well, if I understand it correctly, Mail::Builder::Simple *enforces* the use of UTF-8, which is something I don't like.

This code works, and the message is displayed just fine in my email client:

    use Mail::Sender;
    ref (new Mail::Sender -> MailMsg( {
        smtp      => 'localhost',
        charset   => 'ISO-8859-1',
        from      => '"Pär" <m...@example.com>',
        to        => 'me <m...@example.com>',
        subject   => 'Östra Vägen',
        msg       => "Hello,\n\nWondering about Östra Vägen.\n",
    } )) or die "Cannot send mail: $Mail::Sender::Error\n";

When trying to send the same message using Mail::Builder::Simple, I encountered two problems:

1) I couldn't find a way to change the charset.

2) Mail::Builder objected, claiming that my stated "From:" address

       "Pär" <m...@example.com>

is not valid (which is something I don't understand).

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

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to