I want to send out one off emails from a linux server. The server does not need to receive emails back.
Is there a simpler solution than sendmail for sending outgoing emails only?
I would prefer to use Perl to send the email.
I want to send out one off emails from a linux server. The server does not need to receive emails back.
Is there a simpler solution than sendmail for sending outgoing emails only?
I would prefer to use Perl to send the email.
Calling out to /usr/lib/sendmail
is usually the preferred method because it handles delivery problems correctly. This does not mean using sendmail. Most (all?) mail transport system provide a command that's just named sendmail
and provides an interface compatible to the original.
Alternatively you can send directly through a SMTP relay using a package like Net::SMTP but be extra sure to correctly cater for delivery problems.
You do not need a mail transport agent (MTA) instance on the machine doing the sending if you have another mailserver already running in your organization: you can make Perl deliver the email through SMTP to that server, so there's no need for having (another) MTA like sendmail on "your" machine.
Sendmail is not the only choice. you can use Postfix, Qmail, and many others
my Perl scripts call the mailx command. to know how to use it, type 'man mailx' However this require to have a MTA correclty configured.
Or you can just use the Net::SMTP perl library and use your smtp server of choice
I'm fond of creating a gmail or other free account and then using the java mail api in J2EE to send messages (from your new gmail account) to whoever... Typically i'll create a Mailer class which can be constructed with a default constructor and then give it a send(String dest, String subj, String body[, Obj attach...if you want]) and then in your case you might wrap the thing in a main method so that you can call it from else with some command line args, or call from within some java program. If you interested i'll shoot you the code.