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

SendMail vs. Mail::Sender

by exphysicist (Sexton)
on Nov 21, 2001 at 10:03 UTC ( [id://126730]=perlquestion: print w/replies, xml ) Need Help??

exphysicist has asked for the wisdom of the Perl Monks concerning the following question:

Greetings, I have been ordered to find a cross-platform (all *NIX's + Win2K/NT) package for sending emails.

I thought immediately of Mail::Sender. My boss however directed me to "SendMail.pm". This particular package is available at www.tneoh.zoneit.com/perl/SendMail/SendMail.pm. I could NOT find it on CPAN. Author is Simon Tneoh Chee-Boon.

I've fiddled with Mail::Sender before but never this SendMail. Any comments regarding "SendMail" by Simon Tnech Chee-Boon?

Thanks

Replies are listed 'Best First'.
Re: SendMail vs. Mail::Sender
by doran (Deacon) on Nov 21, 2001 at 11:15 UTC
    I use Mail::Sendmail on Linux, Win2k, NT and Win98. It's easy and works fine. It requires an SMTP server to actually send the mail, but on a Unix or Win2k box, you can use the one that comes with the machine. BTW, I'm pretty sure Mail::Sendmail is unrelated to the SendMail.pm module you mention, since they have different authors. You can find Mail::Sendmail on CPAN.

    Good Luck...
Re: SendMail vs. Mail::Sender
by Anonymous Monk on Nov 21, 2001 at 14:06 UTC
    It's worth noting that Mail::Sender doesn't conform to the SMTP standard (RFC821) and will break, producing unexpected results with some SMTP servers. Specifically, it always expects single line responses and will break on multiline SMTP responses. We've seen a number of AOL SMTP servers and others that return multiline responses. Looks like SendMail.pm supports them though, so I'd pick that one. Davious
Re: SendMail vs. Mail::Sender
by schumi (Hermit) on Nov 21, 2001 at 15:05 UTC
    Hiya!

    I've never worked with Mail::Sender, but I find that Sendmail is often producing more hassle than being helpful. Whenever I have to send e-mails I use Net::SMTP, which is part of libnet by Graham Barr. It talks directly to an SMTP server and is therefore pretty independent. And there's good documentation to it.

    Update: Having said this, drifter is quite right to point out Mail::Sendmail which is similarly easy to handle as Net::SMTP, BrotherAde tells me. It seems that the docu to it is only one page... I think what this boils down to is, have a look at both modules and see which you like most, and which serves your needs better.

    --cs

    This may or may not help. I'm at the office. Don't hold it against me.

Re: SendMail vs. Mail::Sender
by arturo (Vicar) on Nov 21, 2001 at 20:12 UTC

    Something I'd be interested in is why your boss "direct[ed]" you to SendMail.pm. Does he know of particular features of that package that make it superior to the ones available on CPAN? Or was it the first one he heard of?

    Note that a significant bonus of using Net::SMTP is that it is a well-known and widely used package, and thus carries a strong presumption of having gone through a battle-tested QA process. Of course, that a module is on CPAN is no *guarantee* of its high quality, but Net::SMTP is one of the modules that has a good pedigree and is widely used.

    That said, it's probably worth taking a look at SendMail.pm and running it through, say, Dominus' "repair shop/ red flag" process (see his home node for more; here is a link to one of the articles he wrote for perl.com) to get a handle on the quality of the code.

    HTH.

    I mistrust all systematizers and avoid them. The will to a system shows a lack of integrity

Re: SendMail vs. Mail::Sender
by drifter (Scribe) on Nov 22, 2001 at 02:57 UTC
    As trivial as it may sound, sending mail and catching the result, and making sure that the mail really went where you want it to go, can be much harder then it might seem in the beginning.
    First of all, if you just and only need to send a mail sommewhere, and catching the response is not really needed, the module to use is IO::Socket. Open a socket to the mailserver and pipe the message there.
    On the other hand, if you need to verify atleast the message that the server gave, you have 2 options: either send the mail directly from your script, or use a "link" mailserver, eg. mailserver that is running on the same machine or is the mailserver of your network, and let it do the dirty work for you.

    To make it short, I'd use IO::Socket, it's bulky and needs some programming time overhead, but the advantage is that you won't need to install any additional packages, and it's compatible with any perl. Otherwise I'd use Mail::Sendmail from CPAN. (0.78 is latest I think).
Re: SendMail vs. Mail::Sender
by mattr (Curate) on Nov 22, 2001 at 15:25 UTC
    Presumably you are not looking for a batch emailing program.
    I've used Mail::Sender a bit and it has always been fine. But Net::SMTP sounds a lot safer, I'll try it (Net::SMTP) myself next time.
Re: SendMail vs. Mail::Sender
by faerloche (Sexton) on Nov 21, 2001 at 22:24 UTC
    Have you taken a look a MIME::Lite? It works on Unix and Windows and it's pretty easy to use.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://126730]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-26 06:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found