简体   繁体   English

如何使用其他SMTP服务器和凭据通过bash脚本发送电子邮件?

[英]How can I send email through a bash script using a different SMTP server and credentials?

I have a script which is performing a MySQL dump, and I want it to send an email if and when it fails. 我有一个执行MySQL转储的脚本,我希望它在发生故障时以及何时发送电子邮件。 How can I make the sending of the email use TLS with a username/password, a special port, and an alternate SMTP host? 如何使TLS使用带有用户名/密码,特殊端口和备用SMTP主机的TLS发送电子邮件?

Try sendEmail: http://caspian.dotconf.net/menu/Software/SendEmail/ it allows you to specify an SMTP server and port using the -s flag. 尝试sendEmail: http : //caspian.dotconf.net/menu/Software/SendEmail/,它允许您使用-s标志指定SMTP服务器和端口。 TLS can be enabled using -o tls=yes and a username and password can be set using -o username=... and -o password=... respectively. 可以使用-o tls=yes启用TLS,可以分别使用-o username=...-o password=...设置用户名和密码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM