4, set up under linux qq-mail

First, install mailx sendmail

  1.1 check whether they have installed

        yum install -y  mailx  sendmail

  If you have installed, you will be prompted already installed, not installed automatically installed.

 

  Second, open the sendmail service

  View status: systemctl status sendmail

  If Active: display active (running) is normal, then start the service if it is dead

  Start: systemctl start sendmail

 

Third, configure the service /etc/mall.rc, for example to the mailbox qq

SET from = [email protected] 
SET SMTP = smtp.qq.com 
SET SMTP -auth = User- [email protected] 
SET SMTP -auth-password = nibpgbkksmlbbabe                          

# not qq mailbox password, is generated in the mail settings qq Authorization code

 

 

Fourth, send e-mail 

       4.1 pipe character: 

    echo "mail test info" | mail -s "mail_test" [email protected]

  4.2 file contents as message content: 

    mail -s "mail_test" [email protected] < /tmp/t.txt

 

Five, QQ authorization code generation

  5.1 What is an authorization code?
     QQ mailbox authorization code is introduced for specific password to log a third-party client.
     Login applies to the following services: POP3 / IMAP / SMTP / Exchange / CardDAV / CalDAV service.
  Reminder: In order to secure your account, change the password QQ password and independence will trigger the authorization code expires, you need to obtain a new authorization code to log on.
 
  5.2 how to obtain an authorization code?
    First enter the Settings -> Account page to find the entrance, follow these procedures.
  (1) Click on "open"
             
  (2) verify the secret security
          
(3) obtain authorization code
          
 

Guess you like

Origin www.cnblogs.com/xiaomai-rhce/p/11598990.html