0
Hello, I have a problem when using SMTP with Swift_message.
I put the right information and the email arrives. The problem is that an email arrives for both "From" and "To". Is that normal or do I have to set something up so that it doesn’t happen?
I’ll put the code made with Symfony2 that, despite being a framework, you can understand what is being done.
$transport = \Swift_SmtpTransport::newInstance($host, $port, $security)
->setUsername($login)
->setPassword($senha)
->setAuthMode('login');
$mailer = \Swift_Mailer::newInstance($transport);
$message = \Swift_Message::newInstance()
->setSubject($titulo)
->setFrom($from)
->setTo($para)
->setBody(
$conteudo,
'text/html'
);
$mailer->send($message);
Is there any additional configuration you are doing on Swiftmailer other than the above code?
– Rodrigo Rigotti
Unfortunately no, I just call these objects and if your values, also think that could be another setting in some other part of the application, but I’ve checked and there is no.
– Jose Edinaldo
Do you know if there is something set up on the outgoing mail server to receive a copy of every email sent? I’m trying to find something in the documentation on Swiftmailer but I can’t find any problem similar to yours.
– Rodrigo Rigotti
Well I’m using Digitalocean, I didn’t set up email server, I’m setting up my google account data, will google send email for security?
– Jose Edinaldo
Supplement the question with the incoming email headers (open the incoming email, go to the options menu, and then go to "original show").
– Rodrigo Rigotti