Answer the question
In order to leave comments, you need to log in
How can I send an email without being marked with the message "This email may not have been sent from [my address]"?
Dear colleagues!
Sending an email using SwiftMailer . The problem is that all letters that come from my server end up in the spam folder, and besides, a yellow sign appears at the bottom with the inscription
This email may not have been sent from [my address]
// Create the Transport
$transport = (new Swift_SmtpTransport('aspmx.l.google.com', 25))
->setUsername('[email protected]')
->setPassword('***********')
;
// Create the Mailer using your created Transport
$mailer = new Swift_Mailer($transport);
// Create a message
$message = (new Swift_Message('Wonderful Subject'))
->setFrom(['gmail1 => 'Jack Shcherbakov'])
->setTo(['gmail2'=> 'Jack Shcherbakov'])
->setBody('Here is the message itself')
;
// Send the message
$result = $mailer->send($message);
?>
Answer the question
In order to leave comments, you need to log in
dimonchik2013 , I solved the problem using smtp.mail.ru with port 465 and ssl authentication. Now everything is ok! Everything is very simple in mail.ru - I figured it out in a minute! And with this shitmail (gmail) I sat for 6 hours, so I didn’t understand anything, except that in order for this thing to work, you have to pay googleapps !!!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question