Re: Mailing list integration question [message #168828 is a reply to message #168823] |
Sun, 28 July 2013 03:38 |
|
cpreston
Messages: 160 Registered: July 2012 Location: Oceanside
Karma:
|
Senior Member |
|
|
You're using PHPMailer, right? It is generating the Message-ID, but it's making a random one because you're not specifying it as an environment variable MessageID. That is according to this:
http://www.tig12.net/downloads/apidocs/wp/wp-includes/PHPMailer.class.html# det_fields_MessageID
What message-ID are you grabbing if you're getting it from the one the list returns? Are you grabbing the message ID of the incoming email or the Message-ID of the email you sent that it is replying to, which would be the one you should specify in the "In-Reply-To" field. Whichever one you're grabbing, we end up with not enough info for a complete "References" tag. If you're grabbing the Message-ID of incoming message that is a reply to a forum post, you have the latest message-ID but not the first one, which is what you're supposed to put in the References tag. If you're getting the previous one, then you don't have the current one....
It seems more proper to generate the Message-ID for any outgoing messages, and then pass them on to PHPMailer (pretty easy to generate one http://www.jwz.org/doc/mid.html), then store it with the message in the mlist_msg_id column. Then you do what you're already doing and grab any Message-IDs of any incoming messages and store them in the same column. Then we've got Message-IDs for every message.
You're already doing the right thing with mail_list_post with the "In-Reply-To:" tag. Since we would have Message-IDs for all messages, then it's just a matter of a database query to get the first, last, and other Message-IDs so we can generate the References header.
What do you think?
|
|
|