Mailx: Difference between revisions

From Leo's Notes
This page was last edited on 1 September 2019, at 06:22.
m Text replacement - "{{Navbox Linux}}{{Navbox Linux}}" to "{{Navbox Linux}}"
m Text replacement - "Category:Linux{{Navbox Linux}}" to "{{Navbox Linux}}Category:Linux"
Line 9: Line 9:




[[Category:Linux]]{{Navbox Linux}}
{{Navbox Linux}}[[Category:Linux]]
[[Category:Todo]]
[[Category:Todo]]

Revision as of 06:22, 1 September 2019

By default, mailx will use a local MTA (usually sendmail) to transfer emails. If the machine you're using doesn't have sendmail, mailx will fail to send the email.

This can be resolved by specifying a mail server directly, in the case below, the SMTP server:

mail -s "subject" -S smtp=smtp://smtp.home.steamr.com "recipient@home.steamr.com"

You can set the default SMTP server by defining it in /etc/mail.rc with the following line:

set smtp=smtp://smtp.home.steamr.com