Page 1 of 1

aint working with this script

Posted: Mon Jun 15, 2009 12:38 am
by romeo_16
Hi All,

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(); 
  ?>
 
Thanks,

Re: aint working with this script

Posted: Mon Jun 15, 2009 1:03 am
by omniuni
I suspect the server is not configured correctly. Try sending something with PHP's basic mail() function, and see if that works. If not, see if you get an error. If it does not get an error, and does not work, contact your host.