Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Wow. Looks like more work to me.
I just don't see the value in re-inventing the wheel, or trying to remember every little implementation detail, each time I need to engineer something.I don't see how boo_radley using Net::SMTP is reinventing the wheel. It's a great module, flexible and lets you send an email in as little as 8 or 9 lines. just type perldoc Mail::Internet and you can read about how to use the smtpsend() method without worrrying about details regarding the SMTP protocol.Have you tried perldoc Net::SMTP? Personally, I find using Net::SMTP much easier, the mail headers really aren't that difficult: Probably easier than the method you are using. But it all depends on the application. boo, here's how you can use here docs with Net::SMTP (and I don't necessarily see a problem with using a here doc for this, a template might be overkill): In the above example, the mail() and to() methods actually tell the mailserver the recipient and sender, if you leave out the To: and From: (even subject:) headers, it shouldn't be a problem, but you still need the blank line before your real message begins. That's really all there is to remember, the rest is in the Net::SMTP docs. $ perldoc perldoc Updates: changed one or two words and qualified the opening "wow" In reply to (here docs) Re: (2) Net::SMTP Implementation Details
by $code or die
|
|