Here is a quick example of howto use our servers for sending out transactional messages:
<? require_once("lib/swift_required.php"); $transport = Swift_SmtpTransport::newInstance("HOST.nzmail.eu", 465, "ssl"); $transport->setUsername("USER"); $transport->setPassword("PASS"); $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance() ->setSubject("test") ->setFrom(array("youremail@example.com" => "Test")) ->setBody("Ola this is a test !") ->addPart("<b>Ola this is a HTML test !</b>", "text/html") ->setTo(array("recipient@example.com" => "Catalin Constantin")); $mailer->send($message); ?> |
This example requires PHP and Swiftmailer library.