Dear sir
I am new in php.
I want to sent a mail using SMTP Authentication by host, Username,Password
and want to sent mail on my domain emailID,
i am using folling code
<?php
require_once "Mail.php";
$from = "jitendragupta1040@gmail.com";
$to = "nitin.nammdev@osmoindia.com,jitendra.gupta@osmoindia.com";
$subject = "hi";
$body= "Hello";
$host = "smtpcorp.com";
$username = "rahul.gupta@osmoindia.com";
$password = "mypassword";
$port = "587";
$headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject);
$smtp = & Mail :: factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); }
?>
but it giving following error
Fatal error: Class 'Mail' not found in /home/securenet/Sent/1/Mail.php on line 14
please help to sent email.
thankyou advance.