Email attachment Fatal Error
我正试图让我的php发送一封现在可以正常工作的电子邮件,但我现在正尝试使其与服务器上已经存在的附件一起使用,因此不涉及上传。但是当我运行它时,我得到了这个致命错误:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | <?php require("class.phpmailer.php"); require("class.smtp.php"); $path ="<IMAGES/Logo.jpg>"; $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->Host ="smtp.sulmaxmarketing.com"; // SMTP server $mail->From ="[email protected]"; $mail->FromName ="Murphy's Online Documentation System"; $mail->AddAddress("[email protected]"); $mail->Subject ="Senior Managers Site Tour"; $mail->Body ="You've just recieved an document via the Murphy's Senior Managers Site Tour website.\ Your document is in the attachments"; $mail->WordWrap = 50; AddAttachment($path); if(!$mail->Send()) { echo"<font color='#009900' align=centre> ERROR: Something has gone wrong, please contact the site administrator.</font>"; } else { echo"<font color='#CC0033' align=centre>SUCCESS: You're Senior Managers Site Tour document has been sent.</font>"; } ?> |
好吧,所有固定的忘了忘记在