viewpoint-particle

Author Topic: Postie and Message-ID  (Read 2486 times)

atlanta1213

  • Newbie
  • *
  • Posts: 12
Postie and Message-ID
« on: April 24, 2014, 07:28:05 am »
Is there a way to set the Message-ID in the mail header when using Postie?

Deana

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: Postie and Message-ID
« Reply #1 on: April 24, 2014, 08:18:48 am »
Try appending desired header line to the subject line after a @CRLF. For Example:

Code: Winbatch
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
Deana F.
Technical Support
Wilson WindowWare Inc.

atlanta1213

  • Newbie
  • *
  • Posts: 12
Re: Postie and Message-ID
« Reply #2 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?

Deana

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: Postie and Message-ID
« Reply #3 on: April 25, 2014, 07:30:26 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:

Code: Winbatch
strMsgid = StrReplace( TimeYmdHms(), ':', ''):'@winbatch.com'
Deana F.
Technical Support
Wilson WindowWare Inc.