CentOS 6/7 configure sendEmail to send mail

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

sendEmail-v1.56.tar.gz

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

{*self}{'_SSL_arguments'} = $arg_hash;
    {*self}{'_SSL_ctx'} = IO::Socket::SSL::SSL_Context->new($arg_hash) || return;
    {*self}{'_SSL_opened'} = 1 if $is_server;

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

CentOS 6/7 configure sendEmail to send mail
How to send mail using sendemail on ubuntu
How to install and configure Postfix mail server on CentOS8
Python implements 126 mailboxes to send mail
Python implements QQ mailbox to send mail
Centos7 configure JDK
How to install and configure Elasticsearch on CentOS 7
Configure centos container to support ssh in Docker
Python uses the email module to send mail
How to install and configure VNC on CentOS 8
Configure Nginx to start automatically based on CentOS 7
How to install and configure Redis on CentOS 8
How to install and configure phpMyAdmin on CentOS 6
How to install and configure Owncloud on CentOS 8
How to install and configure Redmine on CentOS 8
Centos 6.4 python 2.6 upgrade to 2.7
Configure Ocserv on CentOS 6
Centos 6.4 python 2.6 upgrade to 2.7
How to configure FTP server with Vsftpd on CentOS 8
CentOS6.5 upgrade kernel to 3.10.28
How to install and configure NFS server on CentOS 8
Configure lamp under centos6.8
Centos7 configure IP address
Centos7 configure nodejs environment
How to configure FTP server with Vsftpd on CentOS 8
CentOS 5 to CentOS 5.8 YUM source
Configure CentOS7 GPU environment
How to configure NTP to join the NTP pool project in CentOS
Detailed steps to install and configure k8s cluster in centos 7
Centos default python2.6 upgrade to
CentOS upgrade python2 to pyth
Centos7.6 method to install Tomcat-8.5.39
Configure static IP under CentOS 7
CentOS 7.2 deploy mail server (Postfix)
Centos6.5 install and configure mongodb
Centos configure multiple virtual IP
Configure swap space on CentOS7
Update gcc to 6.4.0 in centos
Centos configure multiple virtual IP