0
I’m trying to send an email by phpmailer, but it’s always a mistake. So I went to look at some examples of git, but not even the examples are going. I need to release port 25 or 465 to be able to send the SMTP email?
0
I’m trying to send an email by phpmailer, but it’s always a mistake. So I went to look at some examples of git, but not even the examples are going. I need to release port 25 or 465 to be able to send the SMTP email?
Browser other questions tagged php mysql phpmailer smtp
You are not signed in. Login or sign up in order to post.
Which error gives? Connection error? Enable debug to see what happens. $mail->Smtpdebug = true; I usually use port 587 for my work with Phpmailer. $mail->Port = 587;
– Maykel Esser
I need to change my door in shampoo to 587 to be able to do this?
– Maria
It gives the following error: Error in e-mailSMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

– Maria
If it simply gives SMTP connect() failed, it is because in some reason the connection has been refused. Sometimes it is not port. Make sure your server does not ask for SMTP authentication, login, password... did you put the Debug I informed? Usually it has more data about the error.
– Maykel Esser
Which SMTP server are you trying to connect to?? if it’s gmail you need to also configure gmail
SMTPSecure
forssl
. If it is another, you need to see what is needed for configuration. Any missing information may fail. Here’s an example of Phpmailer with gmail: https://www.gn10.com.br/blog/dicas/envie-emails-php-smtp-gmail-google-apps/ Also callSMTPDebug = 1;
1, to display error messages. So you can have more details of what is happening.– Fernando VR