<?php
include("/usr/local/lib/php/Mail.php");
/* mail setup recipients, subject etc */
$recipients = "sysnet4u@gmail.com";
$headers["From"] = "user@iwl.world";
$headers["To"] = "sysnet4u@gmail.com";
$headers["Subject"] = "User feedback";
$mailmsg = "Hello, This is a test.";
/* SMTP server name, port, user/passwd */
//$smtpinfo["host"] = "mail.iwl.world";
$smtpinfo["host"] = "localhost";
$smtpinfo["port"] = "25";
$smtpinfo["auth"] = false;
$smtpinfo["username"] = "smtpusername";
$smtpinfo["password"] = "smtpPassword";
/* Create the mail object using the Mail::factory method */
$mail_object = Mail::factory("smtp", $smtpinfo);
/* Ok send mail */
$mail_object->send($recipients, $headers, $mailmsg);
?>

