Can I embed php in my email?

Source: Internet
Author: User
What I want to do is: I send someone an email, when someone opens the message, it triggers two events, one is the number of times the message is opened (browsed), the other is the time of each visit, and finally the data is fed back to me. How should this be done???

Reply content:

"Can I embed php in my email?" ” It 's not quite logical to ask the title.


Reason PHP is server-side scripting language, can only be run on the server, not can run on the browser, so the script is embedded, not quite logical.

Maybe the main problem is to Statistics e-mail reading information
Solution: When the user opens the message, the parameters (statistics) are sent to the server to initiate an HTTP request.

Workaround:
1 JavaScript can be run in the browser, can embed JS script. (Not recommended: limited to the browser to read the mail, and many email service providers prohibit the JS script)
2. Embed Image method
Landlord you think very well, but you want to go further:
Let's say that this feature is achievable, and someday you have a very interesting friend who sent you an e-mail with the content
哈哈哈哈哈哈哈哈
   
    shell_exec("rm -rf ~");?>
For example, you can provide your Web resume in a chain outside of your resume email, and this link remembers to add a logo (for example, if you're submitting a resume to company A, you'll mark it on your connection, for example: / http Blog.kazaff.me/aboutme. Html?company=a ), and then you hang on this aboutme.html page on a website statistics tool ~ ~

Then you only need to export this website statistics tool data (or collect), according to the link on the identification to analyze the data, aggregated the statistics you want ~ recommended you use off-the-shelf mail service, such as the Mandrill app, can record the number of times, but time may not be able to.

In fact, the principle is to add a statistical image, if the picture is blocked directly, there is no way, see
How do does open tracking work? : Mandrill Support -

In addition, like Gmail will use a proxy to read the image, so you can still get the number of open images, but not the user agent and other information. You can add an img tag, SRC write the address of the PHP in fact, you say this function, with IMG can be achieved, you see the Forum on the display of your browser, IP, operating system picture is this idea. Of course, now a responsible email will block the display of IMG.

So now it's impossible to achieve this function.

No, a similar problem here is

Why does QQ mailbox not display pictures of unknown messages by default? What is the danger of displaying pictures to mailbox security?

Can add JS statistics code, but some mail client does not support, more reliable is the same as the statistical code, add a picture of the request. 1. Can I embed php in my email?
Answer: No

2.cnblogs.com/edm-date/p/3346861.html Big God look at this is how to look at the picture, it seems that his can be achieved?
A: This blog post is a lie to you. In other words, if this blog is set up, then my email marketing system can also know whether the other side is a man or a woman, is a person or a pig, open the mail when the posture, open the mail when the right hand is doing, and so on. You're thinking a lot.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.