Send email through another postfix server from the cli

Send email through a different smtp server from command line

echo "${message}" | mailx -r 'First Guy ' -S smtp='smtp.example.com:25' -s 'subject line example' me@gmail.com

References

Weblinks

  1. http://www.binarytides.com/linux-mail-with-smtp/

Man pages

  1. mailx
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s