2010-10-15 60 views
0

您好,我通过libmail发送邮件,从http://www.phpclasses.org下载。邮件功能正在工作,但它不会在退回路径邮件ID收件箱中提供反弹邮件递送报告,而且我面临如何检查邮件是否已发送的问题。我已经阅读这个带有压缩文件的file:///C:/Program%20Files/xampp/htdocs/libmail2/libmail_en.html#Send%28%29教程,他们没有清楚地提及发送功能过程。我是新来的哎呀功能我只是改变了功能,这样如何检查邮件是否发送不在PHP Libmail

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. 

回答

0

的BounceBack电子邮件发送过程后抵达。它们不在任何PHP邮件发送功能的范围内。

通常会做的是在发送后观看指定邮箱中的任何“无法传送”的邮件。这个过程可以是自动的,但是非常麻烦。

+0

是的,我检查了我的收件箱,邮寄是在交付状态。 – Meena 2010-10-15 10:45:30

+0

@Meena那么你的问题是什么呢?不知道我是否理解 – 2010-10-15 10:49:17

+0

邮件($ strTo,$ this-> xheaders ['Subject'],$ this-> fullBody,$ this-> headers)函数返回邮件发送与否的一些值。我的问题是邮件功能不检查电子邮件是否正确或不正确,即使发送邮件到错误的电子邮件地址它返回true.i认为只有它不提供退回电子邮件返回路径。 – Meena 2010-10-15 11:00:41

0

您可以设置Return-Path标头来定义传送失败时将发送退回邮件的位置。您可以将返回路径地址设置为与POP3邮箱关联。您可以定期使用POP3客户端类检查该邮箱。解析退回消息,您可以确定哪些电子邮件地址正在反弹。您可以使用MIME解析器类来解析消息并为您提取地址。