J
J
JackShcherbakov2018-02-13 19:53:55
gmail
JackShcherbakov, 2018-02-13 19:53:55

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]

. How to fix it? I've read everything I can think of but haven't found a solution. The letter was sent from a variety of gmail boxes. This is how the code that organizes the sending of the letter looks like:
// 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);
?>

And this is what the letter itself looks like:
https://i.stack.imgur.com/9WJWq.jpg
I express my deep gratitude to everyone who will help!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
JackShcherbakov, 2018-02-13
@JackShcherbakov

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

D
Dimonchik, 2018-02-13
@dimonchik2013

you send it not through gmail,
but you need to either through gmyl, or specify the server through which you send

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question