PEAR mail() problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • NotGiven

    PEAR mail() problem

    Ok, I THINK I have access to the PEAR packages in my /path/to/pear/...
    directory. I tested a simple php page with just :
    require("/path/to/pear/Mail.php");
    and the page displayed properly so I assume that means my page can see that
    directory - I might be wrong.

    Here's the code for sending the mail:

    $recipients = 'me@mydomain.co m';
    $headers['From'] = 'me@mydomain.co m';
    $headers['To'] = 'me@mydomain.co m';
    $headers['Subject'] = 'Test message';
    $body = 'Test message';
    $params["host"] = 'smtp.mydomain. com';
    $params["auth"] = True;
    $params["username"] = 'loginID';
    $params["password"] = 'password';
    echo 1;
    $mail_object =& Mail::factory(' smtp', $params);
    echo 2;
    $mail_object->send($recipien ts, $headers, $body);
    echo 3;

    It gets through 2 then does NOT display 3. So, it is not executing the send
    command. (I am using smtp mail for a purpose).

    How can I test or troubleshoot form this point? Any ideas what is going on
    or not going on?

    Many thanks!


Working...