Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Net::SMTP shortcomings if used as a general mail sending module

by lhoward (Vicar)
on May 31, 2002 at 16:52 UTC ( #170766=note: print w/replies, xml ) Need Help??


in reply to Net::SMTP shortcomings if used as a general mail sending module

I agree with you that many people use Net::SMTP when the should be using other modules that are more well suited to quickly "building and sending" an email. However, there are many situations where using Net::SMTP as part of an overall mail solution where you need/want more control and more percise error handling over the SMTP exchange, or for the performance reasons mentioned above.

I frequently use Net:SMTP in conjunction with a module like MIME::Lite, using MIME::Lite to build the body of the message and Net::SMTP to inject it into an email system. Sure, I could use MIME::Lite to send the email via SMTP myself, but I'd loose control of the error handling of the SMTP exchange (for instance, failing over to a backup mailserver easily if my primary mailserver is down).

I don't see any problem with having to separate out each address individually when dealing with Net::SMTP. I normally have the addresses in an array before, so its very easy to do a

foreach(@recipient){ $smtp->to($_); }
  • Comment on Re: Net::SMTP shortcomings if used as a general mail sending module
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://170766]
help
Chatterbox?
[Discipulus]: have you been fired?!?
[LanX]: remote rules, I've been offered jobs in the US with the promise to stay outside
[MidLifeXis]: Nope. Just looking around, as there are multiple culture and business changes in the area I am in.
[MidLifeXis]: not yet, anyway. Who knows. Just do my best and whatever happens happens.
[LanX]: should be even easier for you
[Discipulus]: oh well we cant afford two monks fired in a day!
[LanX]: any news from tye ' s search?
[MidLifeXis]: Ugh - who else?
[Discipulus]: so the right term is 'gired'
[Discipulus]: look at ot by karl

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (16)
As of 2017-03-23 12:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (286 votes). Check out past polls.