Php – Sending e-mails with SMTP from PHP on Ubuntu Server

PHPsmtp

I having problems sending e-mails from my PHP application coded with CodeIgniter framework. I've a fresh install of Ubuntu Server on a VMWare with Apache, PHP and MySQL. The error I get is the next:

220 linux11.dns-servicios.com ESMTP

hello: 250-linux11.dns-servicios.com Hello a.b.c.kion.es [83.49.x.y]
250-SIZE 31457280
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP

from: 250 OK

to: 550-Verification failed for 
550-mensaje de error"
550 Sender verify failed

The following SMTP error was encountered: 550-Verification failed for 550-mensaje de error" 550 Sender verify failed

data: 503-All RCPT commands were rejected with this error:
503-Sender verify failed
503 Valid RCPT command must precede DATA

The following SMTP error was encountered: 503-All RCPT commands were rejected with this error: 503-Sender verify failed 503 Valid RCPT command must precede DATA
500 unrecognized command
The following SMTP error was encountered: 500 unrecognized command
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

What can I do?

Thank you in advance!!!

Best Answer

The error is with the code, not the server.

to: 550-Verification failed for 
550-mensaje de error"
550 Sender verify failed

It looks like you are setting the 'To' to 'mensaje de error"' and obviously this is not an email address.