Feb 26, 2010 12:04 pm
Tony MarstonI am using the IMAP extension to transfer incoming emails from my inbox to a
database table in the CRM application which I am developing. I shall have
screens to view the emails, usually related to a particular customer. I
shall also have screens where outgoing emails can be composed before they
are sent out.
When I receive a reply to an email I can use the in_reply_to field to relate
it back to the message_id of the original email, but this is only useful if
I know the message_id of that email. The value for message_id is not
available until AFTER the message has been sent out, so how do I capture the
message_id of the email which I have just sent?
Feb 26, 2010 2:57 pm
Tyrone SlothropOn Fri, 26 Feb 2010 12:04:56 -0000, "Tony Marston"
<tony@NOSPAM.demon.co.uk> wrote:
>I am using the IMAP extension to transfer incoming emails from my inbox to a
>database table in the CRM application which I am developing. I shall have
>screens to view the emails, usually related to a particular customer. I
>shall also have screens where outgoing emails can be composed before they
>are sent out.
>
>When I receive a reply to an email I can use the in_reply_to field to relate
>it back to the message_id of the original email, but this is only useful if
>I know the message_id of that email. The value for message_id is not
>available until AFTER the message has been sent out, so how do I capture the
>message_id of the email which I have just sent?
>database table in the CRM application which I am developing. I shall have
>screens to view the emails, usually related to a particular customer. I
>shall also have screens where outgoing emails can be composed before they
>are sent out.
>
>When I receive a reply to an email I can use the in_reply_to field to relate
>it back to the message_id of the original email, but this is only useful if
>I know the message_id of that email. The value for message_id is not
>available until AFTER the message has been sent out, so how do I capture the
>message_id of the email which I have just sent?
You may define the Message-Id: within the headers:
$headers .= "Message-Id: some_value@yourdomain.com\n";
I generally use a string like:
time()."_uniqueid@domain";
You can use headers to perform lots of tasks for you but you can
seldom control what is returned in a response.
The purpose I have in setting the Message-Id is to identify users in
the event a bounce which is parsed by a script piped from a
Return-Path address.
Feb 26, 2010 7:05 pm
Peter H. CoffinOn Fri, 26 Feb 2010 12:04:56 -0000, Tony Marston wrote:
> I am using the IMAP extension to transfer incoming emails from my inbox to a
> database table in the CRM application which I am developing. I shall have
> screens to view the emails, usually related to a particular customer. I
> shall also have screens where outgoing emails can be composed before they
> are sent out.
>
> When I receive a reply to an email I can use the in_reply_to field to relate
> it back to the message_id of the original email, but this is only useful if
> I know the message_id of that email. The value for message_id is not
> available until AFTER the message has been sent out, so how do I capture the
> message_id of the email which I have just sent?
> database table in the CRM application which I am developing. I shall have
> screens to view the emails, usually related to a particular customer. I
> shall also have screens where outgoing emails can be composed before they
> are sent out.
>
> When I receive a reply to an email I can use the in_reply_to field to relate
> it back to the message_id of the original email, but this is only useful if
> I know the message_id of that email. The value for message_id is not
> available until AFTER the message has been sent out, so how do I capture the
> message_id of the email which I have just sent?
Mail servers generate message IDs for messages that don't have one. If
the mail already has one, a new one won't be generated. (Note: properly,
you'll want to ensure that the message ID is forever unique. FQDN and
microtime() will probably do nicely.)
Whenever you look at a beautiful woman,
always remember that somewhere, someone is tired of her.
always remember that somewhere, someone is tired of her.
Feb 27, 2010 6:56 am
Tony MarstonThanks. That's useful to know.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
"Tyrone Slothrop" <ts@paranoids.org> wrote in message
news:njnfo5t08pe89abahq296b25q1vn099lrf@4ax.com...
http://www.tonymarston.net
http://www.radicore.org
"Tyrone Slothrop" <ts@paranoids.org> wrote in message
news:njnfo5t08pe89abahq296b25q1vn099lrf@4ax.com...
> On Fri, 26 Feb 2010 12:04:56 -0000, "Tony Marston"
> <tony@NOSPAM.demon.co.uk> wrote:
>
> You may define the Message-Id: within the headers:
> $headers .= "Message-Id: some_value@yourdomain.com\n";
>
> I generally use a string like:
> time()."_uniqueid@domain";
>
> You can use headers to perform lots of tasks for you but you can
> seldom control what is returned in a response.
>
> The purpose I have in setting the Message-Id is to identify users in
> the event a bounce which is parsed by a script piped from a
> Return-Path address.
> <tony@NOSPAM.demon.co.uk> wrote:
>
>>I am using the IMAP extension to transfer incoming emails from my inbox to
>>a
>>database table in the CRM application which I am developing. I shall have
>>screens to view the emails, usually related to a particular customer. I
>>shall also have screens where outgoing emails can be composed before they
>>are sent out.
>>
>>When I receive a reply to an email I can use the in_reply_to field to
>>relate
>>it back to the message_id of the original email, but this is only useful
>>if
>>I know the message_id of that email. The value for message_id is not
>>available until AFTER the message has been sent out, so how do I capture
>>the
>>message_id of the email which I have just sent?
>>>a
>>database table in the CRM application which I am developing. I shall have
>>screens to view the emails, usually related to a particular customer. I
>>shall also have screens where outgoing emails can be composed before they
>>are sent out.
>>
>>When I receive a reply to an email I can use the in_reply_to field to
>>relate
>>it back to the message_id of the original email, but this is only useful
>>if
>>I know the message_id of that email. The value for message_id is not
>>available until AFTER the message has been sent out, so how do I capture
>>the
>>message_id of the email which I have just sent?
> You may define the Message-Id: within the headers:
> $headers .= "Message-Id: some_value@yourdomain.com\n";
>
> I generally use a string like:
> time()."_uniqueid@domain";
>
> You can use headers to perform lots of tasks for you but you can
> seldom control what is returned in a response.
>
> The purpose I have in setting the Message-Id is to identify users in
> the event a bounce which is parsed by a script piped from a
> Return-Path address.
Previous Thread: What makes programming effective?
Next Thread: Email attachment
Related Forum Topics
- How to retrieve xml data from three tables of mysql
- Help with script that retrieve remote files
- Retrieve all HTML elements, their attributes, attribute values, and text from a string?
- Only 1 of 2 emails recived
- Cannot send emails
- I do not receive emails sent by PHPMailer
- Mail function, where emails are written ?
- Embedding a Link in Posts, Emails and Documents
- Error message with if statement huh?
- What is this error message telling me?