I am using Mochahost
, I have have installed Mail from Pear. Now i don't know where it has installed the the files.
Kindly guide me where it has stored the installed files.
When i am using the following code its giving me the following error message.
PHP Warning: require(Mail.php): failed to open stream:
No such file or directory in /home/
The error message is obvious, as i haven't added any file in my application folder.
The following is the code i am following.
Kindly guide me how to include the path of'Mail.php' file .
<?php
//require_once "Mail.php";
require "Mail.php";
$from = "Taha <abc@Hotmail.com>";
$to = "Taha <abc@Hotmail.com>";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$host = "111.11.11.111";
$username = "abc@Hotmail.com";
$password = "password";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$port = "2525";
$smtp = Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
echo "PEAR before";
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}