Jump to content

IMAP Mail


shane18

Recommended Posts

You're all over the place with that idea.  PHP sessions are for browsing/http.  If you want to put your own header fields into the original email with some sort of id in it, yes you can do that. Assuming you're using the php mail() function, the fourth param lets you pass in additional mail headers, each line deliminted by an ending  "\r\n".

 

So you could have something like:

 

$headers = "X-repId: $repid\r\n";

 

 

Link to comment
Share on other sites

More or less, i need a way to send a e-mail to a mobile phone*will receive it as a txt*, and when the person hits reply and sends a message back.... all the emails will go to 1 email address... and i have a script that will read each one and based on a id passed along will sort it to the right user. what i can't figure out, is how to somehow pass a id along with the reply either through an header or some other way...

Link to comment
Share on other sites

I don't understand what you can't figure out.  I have already suggested you a solution.  Set an email header field with whatever value allows you to do the matching.  This field name should start with X-

 

See my code snippet.

 

You would then need a custom program that will read emails out of the email box using imap or pop, and do whatever it is that you need to do, using the X- header value to establish your link.

 

 

Link to comment
Share on other sites

Well, unfortunately, no I don't think this will work.  In my test, the mta does not carry over any headers.  I think your only option is to include a tag in the actual body of the email, and then parse the body for it.  You could for example include something like:

 

[replycode: xxxxx]

 

Perhaps at the bottom of the email, and use that to track it.

 

Sorry but an email header will not work.

 

One other thing you could do would be to set the reply-to address to include a portion of the address with the code.  For example:

 

Have it be Reply-To: someaddress_xxxxxxx.  Your mta would need accept all these emails and send them to the same mailbox, and then use the To: address which will have the someaddress_xxxxxxx and parse it to get the response number.  I know some customer service products that have implemented this scheme for tracking correspondence related to a particular case#

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.