problem sending email

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi all,i'm having this problem in sending email using pear.
it just wont send :(
here's the code ..

<?php
    require_once 'Mail.php';

    $from_name = "My Self";
    $to_name = "My Friend";
    $subject = "Sending Trial";
    $mailmsg = "GOD please make it work";

    $From = "From: ".$from_name." <mymail@xxxxxxxxx>";
    $To = "To: ".$to_name." <someone@xxxxxxxxx>";
    $recipients = "someone@xxxxxxxxx";

    $headers["From"] = $From;
    $headers["To"] = $To;
    $headers["Subject"] = $subject;
    $headers["Content-Type"] = "text/plain; charset=iso-8859-1";

    $smtpinfo["host"] = "smtp.gmail.com";
    $smtpinfo["port"] = "465";
    $smtpinfo["auth"] = true;
    $smtpinfo["username"] = "mymail@xxxxxxxxx";
    $smtpinfo["password"] = "mypassword";

    $mail_object =& Mail::factory("smtp", $smtpinfo);

    $mail_object->send($recipients, $headers, $mailmsg);

    if (PEAR::isError($mail_object))
      echo $mail_object->getMessage();
?>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux