Function mail() PHP not working. I can't sending email


#1

I can’t sending email in WP and PHP applications.


#2

You could check if port 25 open. EE uses port 25 to send mails via postfix. Some providers like google cloud block port 25 to prevent spamming. You can also try using a SMTP plugin in the wordpress site and check if the mails are being sent.


#3

Yeah it’s best to use SMTP relay plugin. I use mailgun.com to relay my emails.


#4

Agree with Cim. I have tried many such solutions and my personal Fave is Sendgrid and “WP Mail SMTP by WPForms” plugin. Easy for simplicity, just install it, choose Sendgrid (after you get account) and paste in API. Done. There are no settings to get wrong. Good to install a mail log plugin too.


#5

sendmail: RCPT TO:contato@site.com.br (451 4.3.0 contato@site.com.br: Temporary lookup failure)


#6

^_^[www-data@site.com.br:~/htdocs]$ php -r ‘mail(“contato@site.com.br”, “Hello Human”, “Hello from EasyEngine!”);’

sendmail: RCPT TO:contato@site.com.br (451 4.3.0 contato@site.com.br: Temporary lookup failure)


#7
php -r 'mail("contato@site.com.br", "Hello Human", "Hello from EasyEngine!");'
sendmail: RCPT TO:<contato@site.com.br> (451 4.3.0 <contato@site.com.br>: Temporary lookup failure) 

#8

I send e-mail and display this: Temporary lookup failure.


#9

Sorry, my english is bad.


#10

I’m have same error


#11

If you change the email to another, for example, contact@gmail.com, it works. It does not send email with the same domain, example contact@site.com.br