Thanks you are right........I must...
Well I want to send mail with php through SMTP server; coz the servers I am using requires authentication for sending any mail, your help would be appreciated.
As I am already trying
PHP Code:
include("Mail.php");
$host = "webmail.mydomain.com"; $username = "info@mydomain.com"; $password = "*******"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); $headers.="Content-type: text/html". "charset=iso-8859-1\r\n"; if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { header('Location: ../getaquote.php?email=yes&name='.$_POST['name'].''); //echo("<p>Message successfully sent!</p>"); }
In this function I've included ("Mail.php"), but it still required PEAR.php where I can find that.
Or another way would be the best.
Last edited by Isabella_Smith; 11-24-2010 at 12:32 AM..
|