Why php is sending email from localhost not from server using PHPMailer?
问题 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's showing me following error without sending email; Error Message is : 2016-04-22 05:53:10 SMTP ERROR: Failed to connect to server: Connection refused (111) 2016-04-22 05:53:10 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting mail is not send I do not understand why it's showing me this error