I am using Symfony 1.4.8 and Propel as ORL. I am sending mails using Symfony miler object, the mail is send properly but it goes to spam folder, is there any way to stop that. the code that i am using,
$to_email_array=array("one@gmail.com","two@gmail.com");
$body="welcome to symfony";
$subject="from Symfony";
$from=array('me@mydomain.com' => 'our Domain');
$mail_object=$this->getMailer();
$message=Swift_Message::newInstance()
->setSubject($subject)
->setBody("<html> <head> </head> <body> <span>Dear {receiver}, </span>".$body."</body> </html>", "text/html")
->setFrom($from)
->setTo($to_email_array);
$mailed=$mail_object->batchSend($message);
The above code is called from a Symfony Task, and we are using our own web server to send mail, with our domain name. The mail is send, but it goes to spam folder. Is there any way to stop the mail going to spam folder.