I would like to get some input from the general public on a few issues with Mail::Sender.

1) Will anyone mind if the SendXxxxx() methods will return the Mail::Sender object instead of the 1 they used to?

This would allow chaining the method calls like this :

eval { (new Mail::Sender) ->OpenMultipart({...}) ->Body(...) ->SendEnc(...) ->Part(...) ->SendEnc(...) ->Attach(...) ->Close(); } if ($@ =~ /^Can't call method/) { die "Cannot send mail : $Mail::Sender::Error\n" } elsif ($@) { die $@,"\n"; }
2) There is a beta version that contains code for the SMTP authentication at http://Jenda.Krynicky.cz/Sender.pm . Currently the only supported protocols are LOGIN, PLAIN and CRAM-DM5, but it should be relatively easy to add other ones. Especialy if anyone sends me a snipet of code that implements them ;-)

There is no documentation on this feature yet and the interface is not yet fixed (yes, THIS is the question). In the beta the new Mail::Sender constructor and the Open, OpenMultipart, MailMsg and MailFile methods accepts three new parameters :

auth => the name of the protocol. Only supports LOGIN, PLAIN and CRAM-MD5 now. username => ... password => ...
I wonder whether to use "username" and "password" or "authid" and "authpwd" or something else ...

I do not have access to any server that would implement PLAIN and CRAM-MD5 so could someone test it and let me know? Or create for me a temporary test account on such a server if there are problems so that I could test?

Thanks for opinions, suggestions, bug and success reports and code snipets.

Jenda

== Jenda@Krynicky.cz == http://Jenda.Krynicky.cz ==
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
      -- Rick Osborne, <osborne@gateway.grumman.com>

In reply to Mail::Sender - authentication and design questions by Jenda

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.