Publishing in PECL php extension smtpmail
| From: | 李明贵 | Date: | Sat, 27 Oct 2012 07:47:40 +0000 |
| Subject: | Publishing in PECL php extension smtpmail | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-9929@lists.php.net to get a copy of this message | ||
I am a php developer in china. I have worked six years on it .I love php
and love opensource. I want to share something with others.
smtpmail is a php extension, it use esmtp protocol to send email . I
develop it because of usually php's function mail can't use in china.Use
php to write a fsockopen client will cost more time and is hard to a newer
learn php. Last , as you know php extension will run faster.
A simple example
<?php
$smtpmail =
smtpmail_connect("smtp.qq.com",25,"test","test","utf-8","\n");
smtpmail_from($smtpmail,"from@qq.com","SMTPMAIL");
$result =
smtpmail_send($smtpmail,'title','content',"to@qq.com","keminar");
if (!$result) {
echo smtpmail_error();
}
smtpmail_quit($smtpmail);
I choose the PHP License 3.01 for my extension
You can get all code from mail attachment or my blog
http://blog.linuxphp.org/smtpmail/