Please help, i can't figure it out what is wrong in sending mail in swift mailer, with this script, there is no error at all and send anything.
Code: Select all
<?
require_once "functions/Swift.php";
require_once "functions/Swift/Connection/SMTP.php";
$smtp->setUsername('emr.notifier@emr.ph');
$smtp->setPassword('*********');
//Create a Swift instance and connect to Gmail (PHP5)
$swift = new Swift(new Swift_Connection_SMTP("smtp.gmail.com", Swift_Connection_SMTP::PORT_SECURE, Swift_Connection_SMTP::ENC_TLS));
$message = "hi";
$email = "nelmar_18@yahoo.com";
//Try sending the email
$sent = $swift->send($message, $email, "Sender name");
//Disconnect from SMTP, we're done
$swift->disconnect();
?>