跟踪php脚本php电子邮件? [英] Track php emails with php script?

查看:239
本文介绍了跟踪php脚本php电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用php mail()函数发送电子邮件通讯。



我必须跟踪通讯电子邮件状态。



状态将为

1.发送数量。

2.数字。交付。

3.交付日期。

4.总数量读取。

5.唯一的Num.Of读取。

6.阅读日期。

7.反弹数字。

8.用户点击电子邮件中的链接总数。

9.唯一的Num.Of用户点击电子邮件中的链接。



从上述状态我可以跟踪以下内容:

1.发送。 //这是从编码发送的跟踪。

8.总数Num.Of点击电子邮件中的链接。 //这是通过在url中添加其他参数来跟踪的。

9.唯一的Num.Of点击了电子邮件中的链接。 //这是通过在url中添加其他参数来跟踪。



如何跟踪从 mail()发送的电子邮件的其他状态/ code>函数?

我必须发送和跟踪来自同一服务器的电子邮件。

I am sending email newsletters using php mail() function.

I have to track the newsletter emails status.

The status would be
1. Num.Of Sent.
2. Num.Of Delivered.
3. Delivered date.
4. Total Num.Of Read.
5. Unique Num.Of Read.
6. Read date.
7. Num.Of Bounced.
8. Total Num.Of users clicked the links in the email.
9. Unique Num.Of users clicked the links in the email.

From the above status i could track the following:
1. Is Sent. // This is tracked as it is sent from coding.
8. Total Num.Of clicked the links in the email. // This is tracked by adding additional parameters in url.
9. Unique Num.Of clicked the links in the email. // This is tracked by adding additional parameters in url.

How to track the other status of the emails sent from mail() function?
I have to send and track emails from same server.

推荐答案

您不能直接跟踪mail()函数的其他状态。技术上只有发送才能告诉你,邮件已成功传递到服务器的出站邮件队列 - 实际上不能告诉您是否离开了您的服务器。

You can't directly track the other status from the mail() function. Technically Is Sent only tells you that the mail was passed over to the server's outbound mail queue successfully - you can't actually tell if it left your server.

1,。您将需要检查您的邮件服务器日志,以查看电子邮件离开服务器的时间。

1,. You will need to check your mail server logs to see exactly when the email left the server.

2,3。交付和交付日期的数量 - 您还需要检查邮件服务器日志,以查看邮件何时被成功移交给第三方邮件服务器。但是,这取决于您对这些统计信息的传递定义(最终用户邮箱?进入他们的电子邮件客户端)。

2,3. Num of delivered and delivered date - again you would need to check your mail server logs to see when the mail was handed over (successfully) to a third party mail server. However it would depend on your definition of delivered (into the end-users mailbox? Into their email client?) as to how reliable these stats would be.

4,5 ,6。总数读取,唯一编号读取,读取日期。你不能准确地跟踪这个。但是,如果您发送HTML电子邮件,您可以将图像嵌入到电子邮件中,图像的来源是您的网络服务器。如果每个图像URL都有您发送电子邮件的人的唯一标识符,那么您可以从服务器日志跟踪(或通过php,如果url是返回图像的php脚本)。然而,这取决于最终用户允许从外部Web服务器加载图像(Outlook和gmail例如默认情况下已关闭)。

4,5,6. Total number read, unique number read, read date. You can't accurately track this. However if you sent HTML email you could embed an image into the email whereby the source of the image was your webserver. If each image URL had a unique identifier for the person you sent the email to then you could track this from your server logs (or via php if the url was a php script that returned an image). However this relies on the end user allowing the loading of images from external webservers (Outlook and gmail for example have this turned off by default).

7,。如果您将地址发送到您的服务器上的脚本,则可以解析反弹消息并确定反弹数量。或者,您可以将from地址设置为您进入并手动检查的邮箱。

7,. If you sent the from address to be a script on your server it could parse the bounce message and determine how many bounced. Alternatively you can just have the from address be a mailbox that you go into and check manually.

8,9.电子邮件中的每个链接都需要链接到您的网络服务器上的网址。该URL可以是一个脚本,它将跟踪谁点击(通过使用查询变量)以及他们想要查看的内容(另一个查询变量),然后将它们(php中的头部函数)重定向到您希望他们结束的位置。

8, 9. Each link in the email would need to be a link to a url on your webserver. That URL could be a script that would track who clicked (by the use of a query variable) and what they want to see (another query variable) and then redirect them (header function in php) to where you want them to end up.

这篇关于跟踪php脚本php电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆