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:
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