Oh, you've rewritten that even with OOP, that's nice. Looks good to me. Cheers
Anatoliy On Wed, November 14, 2012 13:07, 李明贵 wrote: > I am a php developer in china. I have worked six years on it . > I love php and 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. > > > I had wrote a mail some days before.But it has some questions ,So i write > code again and resolved all questions. I wish it will be pass this time. > > > I choose the PHP License 3.01 for my extension > You can get all code from > http://phpsmtpmail.googlecode.com/files/smtpmail-0.3.4.zip > > > Example 1: > $smtpmail = new SmtpMail($smtp_host, $smtp_port, $smtp_timeout, > $smtp_charset, $smtp_delimiter, $is_debug); > $smtpmail->login($smtp_user, $smtp_pass); > $smtpmail->from($smtp_from, $smtp_from_name); > $smtpmail->to($smtp_to, $smtp_to_name); > $smtpmail->cc($smtp_cc, $smtp_cc_name); > $smtpmail->bcc($smtp_bcc, $smtp_bcc_name); > $smtpmail->attachment($smtp_attachment, $smtp_attachment_name); > $smtpmail->send($smtp_subject, $smtp_body); > $smtpmail->error(); > $smtpmail->close(); > > > Example 2: > $smtpmail = new SmtpMail($smtp_host, $smtp_port, $smtp_timeout, > $smtp_charset, $smtp_delimiter, $is_debug); > $smtpmail->login($smtp_user, $smtp_pass); > $smtpmail->from($smtp_from, $smtp_from_name); > $smtpmail->to($smtp_to, $smtp_to_name); > $smtpmail->to($smtp_to2, $smtp_to_name2); > $smtpmail->cc($smtp_cc, $smtp_cc_name); > $smtpmail->cc($smtp_cc2, $smtp_cc_name2); > $smtpmail->bcc($smtp_bcc, $smtp_bcc_name); > $smtpmail->bcc($smtp_bcc2, $smtp_bcc_name2); > $smtpmail->attachment($smtp_attachment, $smtp_attachment_name); > $smtpmail->attachment($smtp_attachment2, $smtp_attachment_name2); > $smtpmail->send($smtp_subject, $smtp_body); > $smtpmail->error(); > $smtpmail->close(); > > -- PECL development discussion Mailing List (http://pecl.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
