1

I'm unable to send emails in php 7.3 using mail() - it returns true but sendmail doesn't work.

  • CentOS 8
  • Postfix and Sendmail: Installed and running
  • Mail sent with Sendmail: no errors (below) but no email - including the SPAM folder php.ini SMTP = mail.levaweb.com
  • AApanel: installed - sending emails from here works

I've seen these posts:

Troubleshooting PHP Mail

https://netcorecloud.com/tutorials/sendmail-in-php-complete-guide/

Test - SSH

echo "Subject: sendmail test" | sendmail -v myemail@gmail.com

220 server1.levaweb.com ESMTP Postfix
>>> EHLO server1.levaweb.com
250-server1.levaweb.com
250-PIPELINING
250-SIZE 102400000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING
>>> STARTTLS
220 2.0.0 Ready to start TLS
>>> EHLO server1.levaweb.com
250-server1.levaweb.com
250-PIPELINING
250-SIZE 102400000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING
>>> MAIL From:<root@server1.levaweb.com> SIZE=23 AUTH=root@server1.levaweb.com
250 2.1.0 Ok
>>> RCPT To:<myemail@gmail.com>
>>> DATA
250 2.1.5 Ok
354 End data with <CR><LF>.<CR><LF>
>>> .
250 2.0.0 Ok: queued as 4CB6C40096
myemail@gmail.com... Sent (Ok: queued as 4CB6C40096)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 Bye

Thank you

aynber
  • 22,380
  • 8
  • 50
  • 63
  • `250 2.0.0 Ok: queued as 4CB6C40096 myemail@gmail.com... Sent (Ok: queued as 4CB6C40096)` It looks like the email is being sent. Check your gmail spam box. – aynber Aug 10 '22 at 15:11
  • You might want to change the From address in case of post-send bouncebacks – aynber Aug 10 '22 at 15:20

1 Answers1

1

I found a way out by installing rainloop web server.

General Grievance
  • 4,555
  • 31
  • 31
  • 45
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 17 '22 at 08:11