How to configure external smpt to send mailbox in ubuntu
How to configure external smpt to send mailboxes in ubuntu? I believe that most people have not yet learned this skill, in order to let you learn, to give you a summary of the following content, do not say much, let's move on.
Add heirloom-mailx apt Feed
Cat / etc/apt/sources.list.d/mailx.list
Deb http://cz.archive.ubuntu.com/ubuntu xenial main universe
Update apt
Apt update
Install heirloom-mailx
Apt install heirloom-mailx-y
Configure an external shipping mailbox
Edit / etc/s-nail.rc add at the end:
For 163mailbox
Set from= "xxxxx@163.com" # sending address
Set smtp= "smtps://smtp.163.com:465" # smtp server
Set smtp-auth-user= "xxxxxx@163.com" # login address
Set smtp-auth-password= "xxxx" # plaintext password
Set smtp-auth=login # login method. The default is login, and it can also be changed to CRAM-MD5 or PLAIN.
For outlook
Set from= "xxxx@outlook.com"
Set smtp= "outlook.office365.com:587"
Set smtp-auth-user= "xxxx@outlook.com"
Set smtp-auth-password= "xxxx" # plaintext password
Set smtp-use-starttls # encryption method
Set ssl-verify=ignore # ignore ssl authentication
Set smtp-auth=login
For QQ mail
Set from= "xxx@qq.com"
Set smtp= "smtps://smtp.qq.com:465"
Set smtp-auth-user= "xxx@qq.com"
Set smtp-auth-password= "ahkphxxabcbshabbga" # QQ Mail authorization code
Set smtp-auth=login
Common command
Common commands:
N: do not read the settings file (/ etc/s-nail.rc in this system) (this file allows users to send mail using an external mail transfer agent instead of using the system's own sendmail).
S: sets the subject information of the message.
C: use a CC list.
B: use a BCC list. Send a test email
Echo "content" | s-nail-s "theme" xxxx@163.com,xxxx@outlook.com # multiple mailboxes are separated by commas
Or:
S-nail-s "email subject" xxx@163.com < result.txt
Add the parameter v to see the details of the mail output
S-nail-vs "email subject" xxx@163.com < result.txt sending belt attachment
S-nail-an attachment-s "subject" pickup address < file (email body .txt)
S-nail-a / xxx.tar.gz-s "theme" xxx@163.com <. / xxx.txtshell as editor, press Ctrl-D to finish editing content
S-nail-s' theme 'xxx@163.com after reading this article, have you learned how to configure external smpt to send mailboxes in ubuntu? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel. Thank you for reading.