Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:send_email_via_gmail_smtp_cmd_line [2014/12/08 20:28] billdozor |
linux_wiki:send_email_via_gmail_smtp_cmd_line [2016/03/18 23:02] billdozor [Send Email via Gmail SMTP Cmd Line] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Send Email via Gmail SMTP Cmd Line ====== | ====== Send Email via Gmail SMTP Cmd Line ====== | ||
- | Goal: To send an e-mail message from a bash script or command line program. | ||
- | Prerequisites | + | **General Information** |
- | * Install msmtp | + | |
- | * Install mailx | + | Send an e-mail message from a bash script or command line program. |
+ | |||
+ | **Checklist** | ||
+ | * Distro(s): Debian/ | ||
+ | |||
+ | ---- | ||
===== Install msmtp ===== | ===== Install msmtp ===== | ||
Line 12: | Line 16: | ||
sudo apt-get install msmtp-mta | sudo apt-get install msmtp-mta | ||
</ | </ | ||
+ | |||
+ | ---- | ||
===== Install Mailx ===== | ===== Install Mailx ===== | ||
Line 19: | Line 25: | ||
sudo apt-get install heirloom-mailx | sudo apt-get install heirloom-mailx | ||
</ | </ | ||
+ | |||
+ | ---- | ||
===== Configure Gmail Account on MSMTP ===== | ===== Configure Gmail Account on MSMTP ===== | ||
Line 62: | Line 70: | ||
chmod 600 .msmtprc | chmod 600 .msmtprc | ||
</ | </ | ||
+ | |||
+ | ---- | ||
===== Configure Mailx ===== | ===== Configure Mailx ===== | ||
Line 76: | Line 86: | ||
set message-sendmail-extra-arguments=" | set message-sendmail-extra-arguments=" | ||
</ | </ | ||
+ | |||
+ | ---- | ||
===== Send mail from the command line ===== | ===== Send mail from the command line ===== |