Я пытаюсь отправить письмо через swiftmailer, и мой код:
$message->setFrom($from);
$message->setBody($template, 'text/html');
$message->setTo($from);
$message->addPart($text, 'text/plain');
//$message->attach(Swift_Attachment::fromPath('D:/file.txt'));
// send message
if ($recipients = $swift->send($message, $failures)) {
, но проблема в том, что я получаю пустое сообщение!$ template - это переменная, содержащая HTML-код!