-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Namecheap Hosting: Mailer Error: SMTP connect() failed. #1115
Comments
It's unlikely to be a server issue, far more likely to be a network issue. If you follow the troubleshooting guide, it will allow you to diagnose where the problem is. |
i have enabled smtdebug= 2 and i get this message
|
Did you try doing what it said?
|
yes i did. By the way i just changed host today. |
I will see what i can do if i won't find a solution until tomorrow i will swap to php Mail() |
This is a common problem that has nothing to do with the code; it's just gmail's policy, and this question has come up here and on Stack Overflow many times: when gmail sees you use a new authentication mechanism, it wants to be sure it's you. PHPMailer can act as a wrapper around |
Php mail sends emails directly from a script which opens and closes an SMTP socket. |
No it doesn't. It passes a message via a shell to a sendmail binary. That binary usually opens a synchronous SMTP connection to localhost, but that is entirely invisible to PHP. Sending via |
okay nice to know it, i know smtp is much faster and better but i have to figure how to solve this problem |
Is that possible to try using microsoft smtp settings? I'm having trouble to find those settings |
okay here they are:
|
Now i get different error:
|
The name |
yes |
emails are receiving in localhost and heroku but not in namecheap hosting. I have contacted again their support but they can't find a solution. |
You're using a from address that's different from your username, and that's what it's complaining about – so don't do that? |
here is the script: https://www.mpoliasma.top/blog/blog.php try it your self. I told you script works fine nothing error in the code. |
i get this now: {"error":"You must provide at least one recipient email address."} |
Are you calling |
|
So you're not checking the return value like I asked? |
the return value is my email. What do you mean ? |
anyway they said they opened a Ticket DKY-580-73644 and they will try to solve this issue |
|
this is what it returns:
|
What?! Clearly whatever you're putting in |
sorry i am not experienced in programming , i am still a student |
Here is my complete script: |
In localhost where i receive the email it returns :
|
You're passing in the user-submitted address:
Then using it as the From address:
That's straightforward forgery/spoofing, and gmail will not allow it, and it will cause SPF failures even if it did. Base your code on the gmail example provided with PHPMailer, and read the comments in the code. |
But why they allow it through heroku and localhost with the same code. That's weird. I will try to change my code to see if emails will be sent. Based on this code: https://github.com/PHPMailer/PHPMailer/blob/master/examples/gmail.phps |
I have added exactly the same script as this link but it doesn't seem to send emails. They send from localhost though. |
i'm not an expert otherwise i would fix the problem the same day |
OKay i fixed the problem. The trick was this link: |
@csandreas1 last link is for asking to app confirmation ... |
any one has an answer ? about MapiExceptionSendAsDenied it outlook issue |
Please can you tell the tricks here? Having the same problem. Started using namecheap hosting and after that phpMailer stopped working. |
My script is tested and working on heroku. After transfering my website to namecheap i get
SMTP connect() failed error
. I have contacted their weak support and the only thing they are saying is check your script etc. They claimed that they opened ports 587 tls. Is there anything i can tell them to do to fix the problem? Because it is totally a server issueThe text was updated successfully, but these errors were encountered: