<?php
include("/usr/lib64/php/Mail.php");
// mail setup recipients, subject etc /
$recipients = "sysnet4u@gmail.com";
$headers["From"] = "user@iwl.world";
$headers["To"] = "sysnet4u@gmail.com";
$headers["Subject"] = "Test Iwl test mail";
$mailmsg = "Hello, This is a test.";
// SMTP server name, port, user/passwd /
$smtpinfo["host"] = "mail.iwl.world";
$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);


?>