sendEmail is an excellent third-party mail command under Linux. It is very simple. You can set smtp and will not be recognized as SPAM (spam) or rejected directly.
The original text of this article is transferred from Mipu's blog: [CentOS 6/7 configure sendEmail to send mail] (https://blog.mimvp.com/article/26981.html)
sendEmail official website: http://caspian.dotconf.net/menu/Software/SendEmail/
sendEmail download: sendEmail-v1.56.tar.gz (2009)
1、 sendEmail download
2、 Unzip, install
tar zxvf sendEmail-v1.56.tar.gz
cd sendEmail-v1.56
cp sendEmail /usr/local/bin/
View the unzipped file
# ll sendEmail-v1.56
total 116-rw-r--r--1 root root 13329 Sep 302009 CHANGELOG
- rw-r--r--1 root root 7949 Sep 302009 README
- rw-r--r--1 root root 4701 Sep 302009 README-BR.txt
- rwxr-xr-x 1 root root 80213 Sep 302009 sendEmail
lrwxrwxrwx 1 root root 9 Sep 302009 sendEmail.pl -> sendEmail
- rw-r--r--1 root root 1229 Sep 302009 TODO
3、 sendEmail parameters
sendEmail -h
4、 Applications
**1 ) Qq corporate mailbox to send mail **
/usr/local/bin/sendEmail -f [email protected] -t [email protected] -s smtp.exmail.qq.com -u "Mail title" -o message-charset=utf-8 -xu robot@ mimvp.com -xp mimvp-password -m "mail body content"
The result is wrong, the information is as follows:
# /usr/local/bin/sendEmail -f [email protected] -t [email protected] -s smtp.exmail.qq.com -u "mail title"-o message-charset=utf-8-xu [email protected] -xp mimvp-password -m "Message body content"*******************************************************************
Using the defaultof SSL_verify_mode of SSL_VERIFY_NONE for client
is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER
together with SSL_ca_file|SSL_ca_path for verification.
If you really don't want to verify the certificate and keep the
connection open to Man-In-The-Middle attacks please set
SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application.*******************************************************************
at /usr/local/bin/sendEmail line 1906.
invalid SSL_version specified at /usr/share/perl5/vendor_perl/IO/Socket/SSL.pm line 424.
View source code:
vim /usr/share/perl5/vendor_perl/IO/Socket/SSL.pm +424
Perl version should be incompatible
# perl -v
This is perl 5, version 16, subversion 3(v5.16.3) built for x86_64-linux-thread-multi(with29 registered patches, see perl -V for more detail)
Copyright 1987-2012, Larry Wall
Solution, sendEmail adds two parameters
Complete and correct command:
/usr/local/bin/sendEmail -f [email protected] -t [email protected] -s smtp.exmail.qq.com -u "Mail title" -o message-charset=utf-8 -xu robot@ mimvp.com -xp mimvp-password -m "mail body content" -o tls=no
# /usr/local/bin/sendEmail -f [email protected] -t [email protected] -s smtp.exmail.qq.com -u "mail title"-o message-charset=utf-8-xu [email protected] -xp mimvp-password -m "Message body content"-o tls=no
Aug 0200:27:47 mimvp-sz sendEmail[15493]: Email was sent successfully!
QQ corporate email is username + password; QQ personal email is username + random code
View sent mail:
**2 ) 163 personal mailbox sending mail **
Also need to add two parameters -o tls=no
/usr/local/bin/sendEmail -f [email protected] -t [email protected] -s smtp.163.com -u "Mail title" -o message-charset=utf-8 -xu yanggang@163. com -xp mimvp-auth-code -m "mail body content" -o tls=no
# /usr/local/bin/sendEmail -f [email protected] -t [email protected] -s smtp.163.com -u "mail title"-o message-charset=utf-8-xu [email protected] -xp mimvp-auth-code -m "Message body content"-o tls=no
Aug 0200:31:37 mimvp-sz sendEmail[15642]: Email was sent successfully!
163 The personal email is the user name + authorization code (mimvp-auth-code), not a password, please refer to Mipu Blog for setting and obtaining authorization code: [The role and contact of POP3, SMTP, IMAP] (https://blog.mimvp.com/article/6030.html)
Successfully sent screenshot:
summary
After comparison and actual measurement, it is found that Alibaba Cloud has blocked the server with port 25, and it is impossible to use sendEmail to send emails. Only the open and unblocked port 25 can be sent.
Tossing and using smtps://smtp.exmail.qq.com:165 to send mail, the result was not successful!
If you are interested, you can continue to toss and let me know if you are finished~.~
Recommended Posts