tags:

views:

19

answers:

1

Hi i am sending the mail through the libmail, downloaded from http://www.phpclasses.org . Mail Function is working fime but it does not deliver the bounced message delivered report in the return path mail ID inbox and also i am face the problem in how to check if the mail is delivered are not. i already read this file:///C:/Program%20Files/xampp/htdocs/libmail2/libmail_en.html#Send%28%29 tutorial with the zipped file they are not clearly mention the send function process. i am new to the oops function i just change the function like this

public function Send () {
        $this->BuildMail ();
        $strTo = implode (", ", $this->sendto);

    if(!mail ($strTo, $this->xheaders['Subject'], $this->fullBody, $this->headers))
    {
    print_r("Unable To Send At This Time Please Try Again Later");
    $strTo = "**@gmail.com";
    $this->Subject("Could Not Delivery The Mail At This Time . Please Try Again Later");
    //xheaders['Subject'] = "Mail Sending Failed";
    //mail ($strTo, $this->xheaders['Subject'], $this->fullBody, $this->headers);
    return mail ($strTo, $this->xheaders['Subject'], $this->fullBody, $this->headers);
    }
    else
    {
    print_r("Message Send Successfully");
    //return mail ($strTo, $this->xheaders['Subject'], $this->fullBody, $this->headers);
    }
    //
} . If any Body already experienced with the libmail functionality please guide me. Thanks in advance.
A: 

Bounceback E-Mails arrive after the sending process. They are not within the scope of any PHP mail sending function.

What one would usually do is to watch the specified mailbox for any "undeliverable" messages after sending. This process can be automated but it's very cumbersome.

Pekka
yes i checked my inbox that mailed is in delivered status .
Meena
@Meena so what is your question then? Not sure I understand
Pekka
mail ($strTo, $this->xheaders['Subject'], $this->fullBody, $this->headers) function returns some value deponds upon the mail send or not. My problem is the mail function does not check whether the e-mail is correct or Not even if send the mail to wrong email address it return true.i think so only it does not deliver the bounced back email to return path.
Meena
@Meena yes, that is because the mail() function passes the message on to the system's mail server which will then determine how to send it. Nothing you can do really except check the mail address for validity beforehand, or read through the bouncebacks
Pekka
ok Sorry Is there is any function is available to check whether the email is valid or not. Bcoz i am trying this in past 1 week still i did notsolve this issue
Meena
@Meena sure. See http://stackoverflow.com/questions/201323/what-is-the-best-regular-expression-for-validating-email-addresses
Pekka
Thank you so much Pekka . That link is very useful for me
Meena