Why php is sending email from localhost not from server using PHPMailer?

后端 未结 2 1249
终归单人心
终归单人心 2021-01-26 12:15

I am using PHPMailer with SMTP to send email. First I just test it from my localhost and it\'s successfully sent email.

But when I upload the same code to my service it

相关标签:
2条回答
  • 2021-01-26 12:26

    That link to the troubleshooting guide is there for a reason - if you follow it it will tell you exactly what is wrong: GoDaddy blocks outbound SMTP, so you have to use their mail servers. There are many duplicates of this question, so search before you post.

    0 讨论(0)
  • 2021-01-26 12:43

    Some servers have certain functions disable that a user cannot enable them selves. Check with your hosting provider to see if they have the mail() function enabled.

    In this case smtp mail function perfectly working in localhost but not in server.. soo you change the server setting

    0 讨论(0)
提交回复
热议问题