Jump to content

Any way to assign a unique ID to sent e-mail via headers or meta data?


imekul

Recommended Posts

I have a WordPress blog, and I set up a custom PHP script where I can pipe an e-mail sent to a certain address, having it execute this PHP script that parses the e-mail and then posts the WordPress post.

 

This works just fine.

 

As soon as the post is entered (or if another author makes a post), I receive an e-mail with the text of the post.  The subject of the e-mail contains the WordPress post ID.  The reason I do that is because I have the script set up where I can quote a given post by simply replying to the corresponding e-mail.  Since each subject has its own ID, which is tied to the WP post, this works fine.

 

What I'm trying to do is figure out a more elegant way to include a unique identifier -- that is, the post ID -- in some place OTHER than the subject.  For instance, if there was a meta tag or something where I can include a unique identifier, yet it doesn't have to show up in the subject.

 

So an ideal solution would be to take the post ID (say 12345) that would normally show up in the subject, and instead put it in some hidden variable or parameter that is part of the e-mail's headers or meta data.  That way, that data would still be accessible by the PHP script, and could be linked to the correct post, but it also frees up the subject line.

 

Any ideas on how I could accomplish this?  Basically, I'm looking for a way to assign a unique message ID to each e-mail -- some way to track which e-mail is being replied to.  It would be ideal if it was something that was hidden and not shown in the subject or body of the e-mail.

 

Thanks for reading! :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.