InMotion Hosting Support Center

Phpmailer SMTP connection error only in a cron job

n/a Points
2013-12-23 10:49 pm EST

Hits: 1,011
Has anyone experienced "Mailer Error: SMTP Error: Could not connect to SMTP host" using phpmailer but only when run by a cron job. If run directly from a browser no error occurs.

You must login before you can ask a follow up question.

You must login before you can submit an answer.



11,186 Points
2013-12-24 10:05 am EST
I have looked into your site and I see that the cron is running your script the same as it is processed as if you were to access the site in a browser. I am not currently seeing this error at all when running it in a command line as a cron would.

You must login before you can post a comment about this answer.


2015-10-12 4:25 am EST
Same problem I am facing. Did any have solution.

You must login before you can post a comment about this answer.

Like this Question?

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!