Hello I am trying to send email messages with swiftmailer version 4.0.3.
I get a returncode 2. And it seems the messages are sent, however they don’t arrive.
I am using the sendmail transport mode
$this->psTransport = Swift_SendmailTransport::newInstance('/usr/sbin/sendmail -t');
I get a return code of 2 and no exception happens.
Anyone familiar with this problem?
The SMTP Transport, Swift_SmtpTransport is without doubt the most commonly used Transport because it will work on 99% of web servers.
It is a more profissional way to do what you want. See the docs:
http://swiftmailer.org/docs/smtp-transport
SMTP Transport is simple and your messages are better recognized by the receivers because it’s not your webserver sending your emails, but an email server already stabilished, with a known and approved ip.