草庐IT

phpmailerException

全部标签

PHPMailer问题

我收到错误Fatalerror:Uncaughtexception'phpmailerException'withmessage'Invalidaddress:'etc.etc.etc.页面上真的很刺眼。所以我想捕获错误或抑制它或其他东西-然后将它返回到表单,这样用户就可以被告知有错误并重新输入他们的电子邮件地址。所有这一切都将变得整洁有序,而不是像现在这样乱七八糟的错误。有人知道怎么做吗?谢谢 最佳答案 try{//yourcodewhichsendstheemail}catch(phpmailerException$except