Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: SMTP authorisation for MIME emails.

by mda2 (Hermit)
on Aug 22, 2006 at 14:51 UTC ( #568873=note: print w/replies, xml ) Need Help??


in reply to SMTP authorisation for MIME emails.

Net::SMTP implements Auth, but needs Authen::SASL See methods and samples on pod or code:

... cut ... sub auth { my ($self, $username, $password) = @_; eval { require MIME::Base64; require Authen::SASL; } or $self->set_status(500,["Need MIME::Base64 and Authen::SASL to +do auth"]), return 0; ... cut ...

Humm, good! Implements a convenient, test to prevent error... (can be optimized, but it's good!)

I'm using this to send my test messages on authenticaded. .............

--
Marco Antonio
Rio-PM

Replies are listed 'Best First'.
Re^2: SMTP authorisation for MIME emails.
by jdtoronto (Prior) on Aug 22, 2006 at 16:42 UTC
    Thanks mda2,

    I had seen a reference to the auth method in the POD, but when I tried it I had no luck. Seems I didn't read far enough ;)

    After looking at the source for Mail::Internet it seems the Net::SMTP object is well buried and only exists briefly within the scope of the smtpsend method. The author was very prompt in replying and I find myself agreeing with his assetion that their are better ways and this one is no longer something he is prepared to enhance. That being said I think the more appropriate approach would be to use MIME::Entity (to which I am committed) or maybe MIME::Lite to produce the MIME body and then send it explicitly using Net::SMTP.

    jdtoronto

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://568873]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2019-12-10 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?