SMTP class Send mail method is simple and stable, a few lines of simple configuration can send mail, is not very looking forward to try it!
Here's the core code:
Effect screenshot Appreciation:
This article share the method is simple and easy to understand, hoped can help everybody.
The following is to provide you with the source code download address: PHP Use SMTP class to implement e-mail
Now almost all of the free mailboxes require SMTP authentication, unless sent to their own servers, such as 21cn.com Mail can only be sent to 21cn.com.
Avoid a method that cannot be sent when using JMail:
I take 21cn.com as an example,
jmail.send= "my@21cn.com" ' This address you can fill out your own, you can also fill out the wrong, but can not write mistakes
Jmai.addrecipient "somebody@somewhere.com" ' This address is the address you really want to
This tutorial does not use MySQL to store user names and passwords, only as SMTP services,
Need to install DNS, see click Open link http://blog.csdn.net/zhidao_wenge/article/details/69982350
First, install the software:
Yum install Postfix
Yum Install cyrus*
Do not remove the following two will be the error (because do not use MySQL)
Rmp-e Cyrussaslldap
Rmp-e Cyrussaslsql
Second, edit the configuration file
Editor:/ETC/POSTFIX/MAIN.CF (for more inf
e-mail format for the SMTP protocol
Following is the use of Foxmail to receive mail, the source of the message, including the body and two attachments (. Jpg. TXT):
----------------------------------------------------------------
The following sections add headers for mail servers
----------------------------------------------------------------
Received:from m15-17.126.com (unknown [220.181.15.17])
bymx10 (Coremail) with
=migfma0gcsqgsib3dqebaquaa4gnadcbiqkbgqc5n3lnvvrygpcrsoqn+awtpe+ Igyckbppo8hhbcffciiv10hwo4phcogzsakvhojdm4yefkxhqjm7ikzepubate7o47hax1cjpnuidlxhilsbembmxjrjag0hzvn8z6eaoohznaphmk2h4uurj Og8za5bhfzjf7tgwi+k619ffuwidaqab3.11 Restart the service. sudo sudo service opendkim restartIf you have errors, check the logs:/var/log/mail.err and/var/log/mail.logReference Documentation:[1]" How to install and configure Postfix on Ubuntu 16.04 as only sending SMTP
An example of smtp mail sending test_smtp.php
Require ("smtp. php ");
$ Smtp = new smtp_class;
$ Smtp-> host_name = "mail.xiaocui.com ";
$ Smtp-> localhost = "localhost ";
$ From = "webmaster@xiaocui.com ";
$ To = "root@xiaocui.com ";
If ($
* Name: send email with socket* Description: This class enables direct mail to be sent directly using an SMTP server that needs to be verified, refer to the article "email with socket" Author: Limodou* This article earlier, he is to use the SMTP server to send mail, and now basically the SMTP server need to verify, so the class in this articleThe meaning is not v
SharePoint often requires related email notifications. If the enterprise does not have an Exchange mailbox, you can deploy a simple email SMTP service on the local machine of the moss server. The configuration method is as follows:
1. Use "Add/Delete" to add an IIS component, SMTP component.
2. Right-click "my computer"-"manage"-expand the tree of all IIS, and you will find that a default
Java code for authenticating into SMTP server with auth and TLS turned on ..
After a long search I Came internal SS this sample Java code for sendingEmail into an SMTP server which required authentication and secure (TLS)Connection. Hence I thought, I will re-publish it. I found this pieceOf code from Java developer forums... I cocould not trace backLink... thanks to good soul who published it. I thought of
Note: manual input is represented in a blue font, and # is followed by a comment, which cannot be entered.
========= Calculate the base64 encoded username and password first, Used for authentication login ==========[Crazywill @ localhost crazywill] $Perl-mmime: base64-e 'print encode_base64 ("crazywill ");'Y3jhenl3awxs
[Crazywill @ localhost crazywill] $Perl-mmime: base64-e 'print encode_base64 ("mypassword ");'Bxlwyxnzd29yza =
================================ Start the
Php uses the smtp service to send mail first
Define ('smtp _ STATUS_NOT_CONNECTED ', 1, true); define ('smtp _ STATUS_CONNECTED', 2, true); class SMTP {var $ connection; var $ recipients; var $ headers; var $ timeout; var $ errors; var $ status; var $ body; var $ from; var $ host; var $ port; var $ helo; var $ auth; va
On CentOS:The first step: Open the POP3/SMTP service in the QQ mailbox set-up account and set up a separate passwordStep two: Yum install-y mailxStep Three: Vim/etc/mail.rc add your mailbox information at the end of the file:Set [email protected]Set smtp=smtp.qq.comSet smtp-auth-user=82312924Set Smtp-auth-password=your
It's the mail function in PHP that triggers the murders.
I accidentally saw an article with a manual practical SMTP protocol, and then I tried, and a lot of the problems were finally solved.
Now, start.
The SMTP protocol is the routing protocol between the sender and the mail server, and the mail server.
The POP protocol is the delivery protocol that the mail server sends to the receiving party.
We use Te
163.com:POP3 Server address: pop.163.com (port: 110)SMTP Server address: smtp.163.com (port: 25)126 e-Mail:POP3 Server address: pop.126.com (port: 110)SMTP Server address: smtp.126.com (port: 25)139 e-mail:POP3 Server address: pop.139.com (port: 110)SMTP Server address:
Original: http://www.jbxue.com/php/25502.html
This article introduces two methods of sending mail in PHP, using the PHP built-in mail () function to send mail, sending mail using the message class encapsulating the SMTP protocol, and recommending mail delivery using the SMTP protocol encapsulated message class.
How does php send mail? There are many ways to do this, but using the
Sample as below:Require_once ('.. /class.phpmailer.php ');//include ("class.smtp.php"); Optional, gets called from within class.phpmailer.php if not already loaded$mail = new Phpmailer (); $body = file_get_contents (' contents.html '); $body = Eregi_replace ("[\]" "," ', $body); $mail->issmtp (); Telling the class to use Smtp$mail->host = "mail.yourdomain.com"; SMTP server$ma
# Python core programming network protocol programming Email
Email system components:MTA message transmission proxy, responsible for mail routing, queue and sending
SMTP 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 in the mailbox server.Emails must be sent to the mail server via Simple Mail Transfer Pr
Exchange 2000 and Exchange 2003 work differently from Exchange Server 5.5. In Exchange Server 5.5, SMTP is an attachment added through the Internet mail service. In Exchange 2000 and Exchange 2003, SMTP is local-everything is based on SMTP. The default SMTP virtual server itself can process all Internet traffic inbound
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.