处理退回电子邮件

处理退回电子邮件

本文介绍了使用 PHP 处理退回电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的场景:

我有 2 个电子邮件帐户:[email protected][email protected].

I have 2 email accounts: [email protected] and [email protected].

我想用 [email protected] 向我的所有用户发送电子邮件,然后回复"[email protected](在此之前,我的 PHP 脚本可以处理它).

I want to send email to all my users with [email protected] but then "reply to" [email protected] (until here, my PHP script can handle it).

当无法发送电子邮件时,将其发送到[email protected],错误消息可能是553(不存在的电子邮件...)等.

When, the email can't be sent, it's sent to [email protected], the error message could be 553 (non existent email ...) etc.

我的问题是:如何通过处理脚本将所有这些退回的电子邮件(无法发送的电子邮件)定向到[email protected] 以检查退回错误代码?

My question is: How do I direct all those bounce emails (couldn't-sent emails) to [email protected] through a handling script to check for the bounce error codes?

我应该为处理脚本"使用什么编程语言?

What programming language should I be using for the "handling script"?

处理脚本"会是什么样子?能给个样品吗?

What would the "handling script" look like? Can you give a sample?

换句话说:

我应该遵循哪些程序来处理退回邮件?

推荐答案

最好的方案是能够对弹跳类型进行分类:软、硬...

The best scenario is be able to classify the type of bounce: soft, hard...

我们使用的是 BounceStudio.您需要编译它并添加 php 库...一点也不难.您拥有该产品的免费和付费版本

what we use is BounceStudio. You need to compile it and add the php libraries... not hard at all. You have the free and paid version of that product

一旦我们检测到 某种退回 我们使用 PEAR::MAIL::MIME 来搜索我们之前添加到电子邮件中的自定义标头,例如:

once we detect the kind of bounce we use PEAR::MAIL::MIME to search for custom headers that we added previously to the email, lets say:

X-user-id: XXXXX
X-campaign-id: YYYYYY
X-recipient-id: SSSSSSSSS

这样我们就可以知道我们发送电子邮件的真正收件人.

in this way we can know the real recipient that we sent the email to.

希望对你有帮助!所以你可以帮助我达到 500 分:P

hope this help you! so you can help me to get to the 500 points :P

这篇关于使用 PHP 处理退回电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 10:07