Mailx: Difference between revisions
From Leo's Notes
This page was last edited on 24 February 2017, at 19:12.
Created page with " By default, <code>mailx</code> will use a local MTA (usually sendmail) to transfer emails. If the machine you're using doesn't have sendmail, <code>mailx</code> will fail to ..." |
m Text replacement - "<code>" to "{{code|" |
||
| Line 1: | Line 1: | ||
By default, | By default, {{code|mailx</code> will use a local MTA (usually sendmail) to transfer emails. If the machine you're using doesn't have sendmail, {{code|mailx</code> will fail to send the email. | ||
This can be resolved by specifying a mail server directly, in the case below, the SMTP server: | 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" | 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 | You can set the default SMTP server by defining it in {{code|/etc/mail.rc</code> with the following line: | ||
set smtp=smtp://smtp.home.steamr.com | set smtp=smtp://smtp.home.steamr.com | ||
Revision as of 19:12, 24 February 2017
By default, {{code|mailx will use a local MTA (usually sendmail) to transfer emails. If the machine you're using doesn't have sendmail, {{code|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 {{code|/etc/mail.rc with the following line:
set smtp=smtp://smtp.home.steamr.com