Problem with Ajax'd Mail()

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

    Problem with Ajax'd Mail()

    I'm hoping someone can help figure out how to stop a message that
    appears to be generated by my web host when sending to an non-resolvable
    email address that is supported by my web host. Things work correctly
    when sending to an invalid e-mail address off my web host .

    The message returned is
    +:/home/xxxxxx/dead.letter...s aved message in /home/xxxxxxx/dead.letter
    and it ends up before the data in my return statement which then fails
    when my AJAXed javascript chokes attempting to EVAL the result.

    I've tried everything I know to capture, discard or suppress the mesaage
    including using
    Ob_start() before the mail command
    with an Ob_end_clean() prior to the return statement.

    Here's what currently is coded that also does not work
    # kill error display if mail fails
    ini_set ( "display_errors ", "0" ); #Also tried FALSE
    ini_set ( "error_reportin g", 0);
    if (!@mail($visito rmail, $subject, $notes, $hdrs))
    {
    return "document.getEl ementById('resu lt_msg').innerH TML= \"Sendmail
    has failed.\";
    ";
    }

    I admit so being something of a PHP neophyte and any help with this
    issue would be appreciated.

    Thank you
Working...