|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
学会了生成静态网页,现在你应该接触一下XML了,恩,XML也了解了,那么AJAX你也得接触接触吧?AJAX完了....然后...
- <?php include ('class/class.phpmailer.php'); $config = array( 'host'=>'smtp.163.com', 'port'=>'25', 'user'=>'***', 'passwd'=>'****', 'from'=>'juva_zz@163.com', 'fromname'=>'郑州', ); $subject = 'this is a test mail'; $body = '<table style="background:#dfdfdf"><tr><td>测试内容</td></tr><tr><td>这是内容</td></tr></table>'; $address='379018082@qq.com'; $username='自己
'; $mail = new PHPMailer(); $mail->CharSet = 'gb2312'; $mail->IsSMTP(); $mail->Host = $config['host']; $mail->Port = $config['port']; $mail->From = $config['from']; $mail->FromName = $config['fromname']; $mail->SMTPAuth = true; $mail->Username = $config['user']; $mail->Password = $config['passwd']; $mail->Subject=$subject; $mail->AltBody="text/html"; $mail->MsgHTML($body); $mail->AddAddress($address,$username); if(!$mail->Send()) { echo "Mail Error :".$mail->ErrorInfo; }else { echo "祝贺
发送胜利
!"; }
复制代码 然后大吼:别人可以,我为什么就不可以?(是不是有点阎罗教练的味道,默默的确是电影看多了,抽嘴巴是会痛的,各位其实明白这个道理了就行了) |
|