Please register with your real name and do not post any SPAM! Violations: "Hk.", "Getagrip", "therain", "learnandwatch" and "lolox" => deleted
0 Members and 1 Guest are viewing this topic.
<?phprequire_once $_SERVER[DOCUMENT_ROOT] . /swift/swift_required.php;// Create the message$message = Swift_Message::newInstance() // Give the message a subject ->setSubject(Subject and timestamp: . date(Y-m-d H:i:s)) // Set the From address with an associative array ->setFrom(array([email protected] => from)) // Set the To addresses with an associative array ->setTo(array([email protected] => to)) // Give it a body ->setBody(Here is the message itself);// Create the Transport$transport = Swift_SmtpTransport::newInstance(localhost, 25);// Create the Mailer using your created Transport$mailer = Swift_Mailer::newInstance($transport);// Send the message$result = $mailer->send($message);echo > . $result . <;?>
<?phprequire_once $_SERVER[DOCUMENT_ROOT] . /swift/swift_required.php;// Create the message$message = Swift_Message::newInstance();$message->setSubject(Subject and timestamp: . date(Y-m-d H:i:s));$message->setFrom(array([email protected] => from));$message->setTo(array([email protected] => to));$message->setBody(<h1>Caption: HTML mail</h1> My <em>amazing</em> <strong>body</strong>, text/html);// Create the Transport$transport = Swift_SmtpTransport::newInstance(localhost, 25);// Create the Mailer using your created Transport$mailer = Swift_Mailer::newInstance($transport);// Send the message$result = $mailer->send($message);echo > . $result . <;?>