How to check, by PHP, if my script is connecting to SMTP server

前端 未结 3 1765
猫巷女王i
猫巷女王i 2020-12-19 13:04

Simply what the title says. Want to know how to check if the connection is working and if not, what is the error. Btw the SMTP server is exchange 2007.

3条回答
  •  悲哀的现实
    2020-12-19 13:56

    Since this is most likely related to your other question: Configure mail server to work with PHP, I'll put the answer here too:

    You're using the PEAR Mail package. The send() method returns TRUE on success, or a PEAR_Error object otherwise, which will contain details of the failure. Most likely you'd want $PEAR_Error::message. Full details here: Configure mail server to work with PHP

提交回复
热议问题