
17 Feb
2004
17 Feb
'04
6:40 a.m.
... each header field is sepperated by \r\n (CRLF) I want to use this as a deliminator for the email message. Unfortunantly each field in the header can be spread over multiple lines ~ and thereby when I use \r\n as a deliminator with boost it will seperate strings if their is a \r or a \n. This is not what I want to happen.
I can think of two approaches: 1. Split by \r\n as you're doing, then post-process them in a for loop and glue together strings that start with a space. 2. Use Spirit to parse them. (or "hapy", or maybe regex). I think if I was just aiming for 2-3 certain headers I'd use spirit and then I could hard-code the header name and have the parser call directly e.g. the "subject" callback. Darren