hi friends,,,
i am trying to send mail from my local host,,,i am using mamp server and mac os ,,,,
<?php
$host = "smtp.gmail.com";
$username = "easwarsait@gmail.com;
$password = "my mail password";
$FromName = "suresh";
$FromEmail = "msuresh4549@gmail.com";
$ToName = "my friend";
$ToEmail = "karuda74@yahoo.com";
$subject = "hi ,,,,hi";
$body = "sdfds dg dfgfgh fgj fgj ghjj gjgh jghkhgk gjghjhgjgh ";
$from = "suresh<easwarsait@gmail.com>"; // Provide your name and your email address
$to = "balu<karuda74@yahoo.com>";
$headers = array ('From' => $from,'To' => $to,'Subject' => $subject);
$smtp = Mail::factory('smtp',array ('host' => $host,'auth' => true,'username' => $username,'password' => $password)) or die("error in smtp con");
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
}else{
echo("<p>Message successfully sent!</p>");
}
?>
prob in mail sendin
Moderator: General Moderators
-
Phoenixheart
- Forum Contributor
- Posts: 123
- Joined: Tue Nov 16, 2004 7:46 am
- Contact:
Re: prob in mail sendin
...And what are you asking?