Does anyone know a way to use the mail command in perl as a one-liner? I am trying to do something like system("mail username@gmail.com -s Tester) but the only catch is to place the period "." after using the mail command in order to complete the command. I do not want to install any other 3rd party program nor do I want to use sendmail. Does anyone know a way to do this? Thanks!
Try Net::SMTP. It's part of the core distribution, and you don't need to bother around with pipes and stuff.
Awesome, thanks alot. Just one more question: how can I determine what the smtphost is? I checked ENV and Set, but couldn't find anything. Is there a default for this or is this something I need to ask the System Admin about? Thanks again!
---------- Post updated at 09:59 AM ---------- Previous update was at 09:46 AM ----------
I asked the system admin, it was just mailhost. I would suggest anyone who uses this to try that one first. Thanks alot for the help!!!