Configure mailx in Centos to send emails using external smtpConfigure mailx in Centos to use external smtp to send mail to install mailx
yum install mailxConfigure mailx
I recommend 163 mail, of course, QQ mail is also acceptable, PS: Remember to enter the mailbox to open SMTP
Vi/etc/mail. rc // if it does not exist, e
The SMTP (Simple Mail Transfer Protocol) is simply the message Transfer Protocol, which is a set of rules for sending mail from the source address to the destination, and it controls the way the letters are relayed.Python's Smtplib provides a convenient way to send e-mails. It provides a simple encapsulation of the SMTP protocol.First, the opening of the
Lightweight PHP mail to send, need to have SMTP server, code after many combat use, now share the code to everyone
Copy Code code as follows:
/*
Mail Send SMTP Service
Connect SMTP server, send mail, All rights rese
: @ domain name is not required for normal mail authentication.$ Mail-> Password = "mailPassword"; // SMTP password$ Mail-> From = "yourmail@cgsir.com"; // sender's mailbox$ Mail-> FromName = "cgsir.com administrator"; // sender$ Mail-> CharSet = "GB2312"; // the character set is specified here!$ Mail-> Encoding = "base64 ";$ Mail-> AddAddress ($ sendto_email, "username"); // recipient's email address and n
Today, when you use Phpmailer to send SMTP mail, you are prompted for an SMTP Error:could not authenticate error, where the password account is correct, and the mailbox is set to turn on SMTP.
Google Baidu over again, some say that the server has disabled the port, and some say that the class.phpmailer.php in the
Ecshop implementing SMTP Sending mail
This article mainly describes the Ecshop implementation of SMTP send mail, the need for friends can refer to the following
When you send a message by using Ecshop SMTP, in the Cls_smtp class file, execute the statement in the Get_data m
"Share: Php send mail SMTP Class"
Free Share address: http://download.csdn.net/source/2507571
This is the SMTP send message class that separates from the PHP168 system, it is very useful. You can successfully send messages by configuring information about your mail server.
In LINUX, why does mail \ mailx fail to use external SMTP to send mails? Sometimes, to meet certain requirements, a single SMTP server is used as the mail report. Generally, disable the sendmail service on the local machine, modify/etc/mail. rc, and add two lines to specify the external smtp server address and account
Phpmailer version used: 5.2.1The following are some of the code given in the example folder of Phpmailer: test_gamil_basic.php.
The code is as follows
Copy Code
$mail = new Phpmailer ();$body = file_get_contents (' contents.html '); $body = $_post[' body '];$body = Eregi_replace ("[]", ", $body);$mail->issmtp (); Telling the class to use SMTP$mail->smtpdebug = 2; Enables SMTP d
1. Introduction:Server is sometimes through the DHCP to obtain IP, the general server with a network cable and power is good, if each boot also have to connect a monitor and keyboard to see how much IP is inconvenient. Lazy people let it send a message automatically. Here use centos,163 mailbox, mail and so on.2. Guarantee 163 mailbox Open Pop3/smtp/imap Service3. Configure the CentOS Mail#vim/etc/mail.rcse
PHP 7Laravel 5.1OS X El Capitan 10.11.4Brief introductionLaravel provides a concise API based on the popular Swiftmailer function library. Laravel provides drivers for SMTP, Mailgun, Mandrill, Amazon SES, PHP mail functions, and sendmail, allowing you to quickly start sending messages from your chosen local or cloud service. (excerpt Phphub translation document)
Configuration
The mail profile is config/mail.php
return [Default
Yum Install mailModify/etc/mail.rcEmpty file JoinSet [email protected]Smtp=smtp.163.com #smtpserverSet smtp-auth-user=ysy399268824smtp-auth-password= PasswordSmtp-auth=login #smtp AccountBecause mail commands use SendMail or postfix to s
; // key point. An ID value is obtained here.// Message. attachments. Add (Attachment); // you can add multiple attachments.
Smtpclient client = new smtpclient ();Client. Host = strsmtpserver; // set the host name or IP address of the SMTP transactionClient. Port = intport; // port numberClient. usedefacrecredentials = true;Client. deliverymethod = smtpdeliverymethod. Network;Client. enablessl = true; // After SSL encryption, The Gmail mailbox must be
command: rcpt to: Returned data: 250 mail OK
6. send an email requestSend command: Data/R/nReturn command: 354 end data with
7. Send the mail header and bodySend data: the complete data is directly ended with "Returned data: 250 mail OK queued as smtp1, wkjrc7d7f6mfoodga_i7ma =. 52140s2 1189584903
8. End sending dataSend command: Quit/R/nReceive data: 221 bye
9
Send failed
error 1:SMTPLIB. Smtpauthenticationerror: (A, B ' User has no permission ')When we use Python to send a message, the custom client logs on with the user name and password, and then uses the SMTP service to send the mail, and the newly registered 163 mailboxes are not enabled by default, so logins are alway
# Python core programming network protocol programming email
Email system components:MTA message transmission proxy, responsible for mail routing, queue and sendingSMTP Simple Mail Transfer Protocol1. Connect to the server2 Login3. Send a service request4. Exit
Pop: Post Office ProtocolRfc918 "Post Office Protocol aims to allow users' workstation to access emails
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.