0

When messages have come on the Email-server that contains HTTP-response like that:

HTTP/1.0 200 OK Cache-Control: no-cache Date: Wed, 23 Jul 2014 07:36:31 GMT ... the text in Russian here ...

I have following service for sending mail.

<?php

namespace noxaeterna\MainBundle\Service;

class MailService
{
    protected $mailer;

    public function __construct(\Swift_Mailer $mailer)
    {
        $this->mailer = $mailer;
    }

    public function sendMail($from, $to, $body, $subject = '')
    {
        $message = \Swift_Message::newInstance()
            ->setCharset('UTF-8')
            ->setContentType("text/html")
            ->setSubject($subject)
            ->setFrom($from)
            ->setTo($to)
            ->setBody($body);

        $this->mailer->send($message);
    }
}

I hope you can help.

Razip
  • 155
  • 1
  • 12

0 Answers0