Is there a way to set the Message-ID in the mail header when using Postie?
Try appending desired header line to the subject line after a @CRLF. For Example:
AddExtender("WWPST44I.DLL")
strSubject="How to add Message-ID header"
; A common technique used by many message systems is to use a time and date stamp along with the local host's domain name, e.g., 950124.162336@example.com
strMsgid = TimeJulianDay( TimeYmdHms() ):'@winbatch.com'
strHeader = "Message-ID: " : strMsgid
strSubjectHeader = strSubject:@CRLF:strHeader
kInit("mail.sample.com","me@sample.com","","","")
kDest("you@sample.com","","")
bResult = kSendText(strSubjectHeader,"How to add Message-ID header using Postie. Check my header.","","")
If bResult
Message("Message","Sent")
Else
Message("Error",kStatusInfo())
EndIf
Reference: http://en.wikipedia.org/wiki/Message-ID
Thanks so much for that information. One question though, the message id created (for today) using that method is just the Julian day of 735714. Any tips on how I can get somehting specific down to the second?
Quote from: atlanta1213 on April 25, 2014, 06:33:55 AM
Thanks so much for that information. One question though, the message id created (for today) using that method is just the Julian day of 735714. Any tips on how I can get somehting specific down to the second?
See TimeYmdhms. Maybe something like:
strMsgid = StrReplace( TimeYmdHms(), ':', ''):'@winbatch.com'