we are sending emails using sendmail on the command line, with a command such as :
cat <email_contents> | sendmail -t
the <email_contents> contains fields such as sender, recipient etc.:
To: [email protected] Subject: Testing From: [email protected]
as well as a huge file, attachments etc.
we now need to use Authenticated SMTP (pass a login & password argument to authenticate against the SMTP server).
is there a way to do that with this method ? (using sendmail arguments or modifying the email_contents taking in consideration the following elements:
- NOT using mailx or any other mail client. we need to keep using sendmail from the commandline
- NOT amending the sendmail configuration files (sendmail.cf)
thanks again regards,