Skip to content

Instantly share code, notes, and snippets.

@anyt
Created January 21, 2014 10:47
Show Gist options
  • Save anyt/8537897 to your computer and use it in GitHub Desktop.
Save anyt/8537897 to your computer and use it in GitHub Desktop.
<?php
require 'vendor/autoload.php';
// Create the mail transport configuration
$transport = Swift_MailTransport::newInstance();
// Create the message
$message = Swift_Message::newInstance();
$message->setTo(array(
"codins@mail.ru" => "Andrey Yatsenco",
"yatsenco@gmail.com" => "Andrey Yatsenco"
));
$message->setSubject("This email is sent using Swift Mailer");
$message->setBody("You're our best client ever.");
$message->setFrom("andrey@fora-soft.com", "Site Administrator");
// Send the email
$mailer = Swift_Mailer::newInstance($transport);
$mailer->send($message);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment