none
Odd error message sending reply via macro. RRS feed

  • Question

  • when sending a reply message using a macro , we are getting the following :

    Delivery has failed to these recipients or groups:

    first.last@mycompany.com
    The e-mail system had a problem processing this message. It won't try to deliver this message again.







    Diagnostic information for administrators:

    Generating server: server.corp.mycompany.com

    first.last@mycompany.com
    #550 5.6.2 STOREDRV.Submit; subscription not found ##

    Original message headers:

    Received: from server101.corp.mycompany.com ([])
     by server400.corp.mycompany.com

     ([]) with
     mapi id 14.03.0351.000; Tue, 21 Nov 2017 07:05:11 -0800
    MIME-Version: 1.0
    Content-Type: text/plain
    Date: Tue, 21 Nov 2017 07:05:11 -0800
    Message-ID:
     <C0B6AF1B64EE4D4583B411611C0C249693D1AD@server101.corp.mycompany.com

    >
    Subject: Re: test

    and here is the code:

    Sub Reply_Scripting()
    Dim origEmail As MailItem
    Dim replyEmail As MailItem
    Set origEmail = Application.ActiveWindow.Selection.Item(1)
    Set replyEmail = Application.CreateItemFromTemplate("\\storage\company\Sales & Customer Service\joes stuff\AAA 20Off Resp.oft")
    replyEmail.Subject = origEmail.Subject
    replyEmail.To = origEmail.SenderEmailAddress
    Rem replyEmail.To = origEmail.SenderEmailAddress
    replyEmail.CC = origEmail.CC
    replyEmail.HTMLBody = replyEmail.HTMLBody & origEmail.Reply.HTMLBody
     


    Dim recips As Outlook.Recipients
    Dim recip As Outlook.Recipient
    Dim pa As Outlook.PropertyAccessor
    Const PR_SMTP_ADDRESS As String = "http://schemas.microsoft.com/mapi/proptag/0x39FE001E"
    Set recips = origEmail.Recipients
    For Each recip In recips
    Rem Set pa = recip.PropertyAccessor
    Rem Debug.Print pa.GetProperty(PR_SMTP_ADDRESS)
    Rem replyEmail.Sender = pa.GetProperty(PR_SMTP_ADDRESS)
    replyEmail.Sender = recip.AddressEntry
     
    Next
    replyEmail.Display
    End Sub
    This was working properly up to about a week ago. No changes to exchange as far as I know have been made, 

    Can anyone please help

    Thanks
    Tuesday, November 21, 2017 10:24 PM

All replies

  • Hello,

    Do you try to send the reply manually?

    To check if the issue causes from your macro, please reply the mail item manually.  

    If the issue is not related to your code or Outlook Object Model, I would move this thread into Outlook IT Pro Discussions forum.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 22, 2017 5:41 AM
    Moderator
  • Hi Celeste,

    No problems replying manually. I will move this to Outlook IT Pro.

    Thank you,

    Eugene

    Wednesday, November 22, 2017 2:23 PM
  • Hello,

    >>No problems replying manually

    Do you mean it works when you create and send the same item manually?

    According to the error message,"#550 5.6.2 STOREDRV.Submit; subscription not found ##" Do you check if your subscription has expired? 

    I think it should return the same error message as the issue occurs in the process of sending. The macro is used to create the mail item and send it programmatically like you clicking Send button. It should return some runtime errors if the issue is related to code.

    I suggest you do the following test to narrow down the issue.

    In the macro, you are using "Display" method to show the mail item. If you click send button instead of using Send method in the macro, would the mail item be sent?

    If you get the mail item created by macro, then create a new item manually by clicking New Email in the Home tab, copy and paste sender and receiver from the 1st mailitem and then click Send method, would you get any error? 

    If the problem only occurs when you use macros, please output the sender and receivers in the macro and hard code them and test again. 

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, November 23, 2017 1:44 AM
    Moderator