NetTalk Central

Author Topic: Receive e-mail - processing Bounce Messages  (Read 5347 times)

PaulMacFarlane

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Receive e-mail - processing Bounce Messages
« on: May 30, 2014, 08:12:59 AM »
I think it was a change in version of NT, but the following code no longer gets the correct email address from the message.

The fields do not seem to deliver any values anymore....

Does anyone have an example of processing bounce messages?

Thanks.
Paul

Code: [Select]
SaveMessage     routine

! Save the message

        rcvd:Subject = clip(GetMsg.Subject)
        rcvd:account_address = GetMsg.user
        rcvd:DeliveryReceiptTo = clip(GetMsg.DeliveryReceiptTo)
        rcvd:DSOriginalRecipient = clip(GetMsg.DeliveryStatusOriginalRecipient)
        rcvd:DSFinalRecipient = clip(GetMsg.DeliveryStatusFinalRecipient)
        rcvd:DSAction = clip(GetMsg.DeliveryStatusAction)
        rcvd:DSStatus = clip(GetMsg.DeliveryStatusStatus)
        rcvd:DSRemoteMTA = clip(GetMsg.DeliveryStatusRemoteMTA)
        rcvd:DSDiagCode = clip(GetMsg.DeliveryStatusDiagnosticCode)
        rcvd:DSLastAttemptDate = clip(GetMsg.DeliveryStatusLastAttemptDate)
        rcvd:MessageID = clip(GetMsg.MessageID)
        rcvd:WholeMsg = clip(GetMsg.WholeMessage[1:GetMsg.WholeMessageLen])

        rcvd:ToAddress = clip(GetMsg.ToList)
        rcvd:FromAddress = clip(GetMsg.From)

        TempDateStr = GetMsg.sentdate
        TempDateStr = sub(TempDateStr,6,11)
        TempTimeStr = GetMsg.sentdate
        TempTimeStr = sub(TempTimeStr,len(TempTimeStr)-18,8)

        rcvd:rcvDate_DATE = deformat(TempDateStr,@D8)  ! today()
        rcvd:rcvDate_TIME = deformat(TempTimeStr,@T4)

        Access:RcvdeMail.Insert()


PaulMacFarlane

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Email
Re: Receive e-mail - processing Bounce Messages
« Reply #1 on: June 03, 2014, 08:39:28 AM »
Nobody's doing this?   ::)

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Receive e-mail - processing Bounce Messages
« Reply #2 on: June 03, 2014, 11:54:44 PM »
have you checked out the NetDemo app? that has an example of an "email receive" window, which gets information from the incoming emails. That's where I'd likely start to debug what's going on here.

cheers
Bruce