This is my code:
<?php
include('Mail.php');
include('Mail/mime.php');
$text = 'Text version of email';
$html = '<html><body>HTML version of email</body></html>';
$crlf = "\n";
$hdrs = array(
'From' => 'teeyc@streamyx.com',
'Subject' => 'Test mime message'
);
$mime = new Mail_mime($crlf);
$mime->setTXTBody($text);
$mime->setHTMLBody($html);
$body = $mime->get();
$hdrs = $mime->headers($hdrs);
$host = "smtp.domain.com";
$username = "email";
$password = "password";
$mail =& Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));
$mail->send('example@example.com', $hdrs, $body);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>
When I proceed this, it shows Message successfully sent!
but when i check my mail inbox it show nothing.why?