XPertMailer PHP发送邮件函数库开源项目

我要开发同款
匿名用户2009年10月18日
21阅读
开发技术PHP
所属分类程序开发、网络工具包
授权协议未知

作品详情

你可以利用XPertMailer来发送MIME类型的邮件如text,HTML,含图片的HTML页面,附件等。支持Cc和Bcc功能。

示例代码:

<?phpdefine('DISPLAY_XPM4_ERRORS',true);//displayXPM4errorsrequire_once'/path-to/MAIL.php';//pathto'MAIL.php'filefromXPM4package$m=newMAIL;//initializeMAILclass$m->From('username@myaddress.net');//setfromaddress$m->AddTo('client@destination.net');//addtoaddress$m->Subject('HelloWorld!');//setsubject$m->Text('Textmessage.');//settextmessage//connecttoMTAserver'smtp.hostname.net'port'25'withauthentication:'username'/'password'$c=$m->Connect('smtp.hostname.net',25,'username','password')ordie(print_r($m->Result));//sendmailrelayusingthe'$c'resourceconnectionecho$m->Send($c)?'Mailsent!':'Error!';$m->Disconnect();//disconnectfromserverprint_r($m->History);//optional,fordebugging?>

查看全文
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论