使用 Perl 通过 SMTP 协议发信
# Swaks is an smtp of CURL, install it first:curl http://www.jetmore.org/john/code/swaks/files/swaks-20130209.0/swaks -o swaks# Set the permissions for the script so you can run itchmod +x swaks# It's based on perl, so install perlsudo apt-get -y install perl# now send!./swaks --auth \--server smtpdm.aliyun.com \--au domaintest@dm.aliyun.com \--ap ***** \--from domaintest@dm.aliyun.com \--to test@test.com \--reply-to 自定义回信地址 \--h-Subject: "Hello" \--body 'Testing mail!'
注:请在 —au 后替换发信地址;—ap 后替换 SMTP 密码;—from后替换发信地址;—to 后替换收信地址。
该文章对您有帮助吗?