none
Regarding email send issue with attachment RRS feed

  • Question

  • Hello,

              I am using microsoft outlook rest api to send emails. according to documentation provided by microsoft to overcome limit of email attachment one need to integrate outlook REST API. i am receiving error on sending email with attachment having size greater than 6MB. I have already tried to send multiple provider but am getting same error where as it's working fine with attachment size is less than 6MB.

             Below is the error i am receiving from microsoft.

             Delivery has failed to these recipients or groups:

                Your message wasn't delivered because the recipient's email provider rejected it.

               Diagnostic information for administrators:

               Generating server: MA1PR0101MB1606.INDPRD01.PROD.OUTLOOK.COM

               *** Email address is removed for privacy ***
               Remote Server returned '550 5.7.501 Service unavailable. Spam abuse detected from IP range. For more information please go to http://go.microsoft.com/fwlink/?LinkId=526653.                      S(2017052602) [MA1PR0101MB1607.INDPRD01.PROD.OUTLOOK.COM]'

               Original message headers:

               Received: from MA1PR0101MB1606.INDPRD01.PROD.OUTLOOK.COM
                ([fe80::481b:c389:feeb:a2ba]) by MA1PR0101MB1606.INDPRD01.PROD.OUTLOOK.COM
                ([fe80::481b:c389:feeb:a2ba%7]) with mapi id 15.20.1059.023; Wed, 22 Aug 2018
                13:17:56 +0000
               MIME-Version: 1.0
               Content-Type: text/plain
               Date: Wed, 22 Aug 2018 13:17:56 +0000
               Message-ID:
    	<*** Email address is removed for privacy ***>
               Subject: Your message wasn't delivered because the recipient's email provider rejected it.
    Thursday, August 23, 2018 6:01 AM

All replies

  • Hi Kaushik,

    Could you please provide your detail code for us ? Thanks.

    Best Regards,

    Simon 


    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.

    Thursday, August 23, 2018 10:55 AM
    Moderator
  • creating draft email using this API : https://outlook.office.com/api/v2.0/me/messages

    creating attachments using this API : https://outlook.office.com/api/v2.0/me/messages/{message_id}/attachments

    sending draft email using this API: https://outlook.office.com/api/v2.0/me/messages/{message_id}/send

    Friday, August 24, 2018 5:39 AM
  • According to the API you provided, I'm trying to reproduce your issue. I'll let you know if there are any updates. 

    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.

    Friday, August 24, 2018 6:05 AM
    Moderator
  • kindly note that it works fine when i am attaching files having size < 6MB but produces issue when sending file larger than 6MB. 

    Also note that if i am sending same file from portal to same emailAddress it work's fine.

    Friday, August 24, 2018 6:20 AM
  • Hi Kaushik,

    Thanks for your reply and sorry for late response. Based on my test as your mentioned, It successfully sent a mail with larger than 6MB attachments. However, I reference this post to implement it and the steps as below:

    1. Modify the code like this :

    var displayResults = mailResults.CurrentPage.Where(m => m.IsDraft == true).Select(m => new Models.DisplayMessage(m.Subject, m.ReceivedDateTime, m.From,m.Id,m.BodyPreview));


    And get the ID of the draft email. 

    2. Created a draft mail with larger than 6MB attachments and get it's ID in the project.

    3. Used this API to send this draft mail: 'POST https://outlook.office.com/api/v2.0/me/messages/{message_id}/send'. It successfully sent this mail.

    Also, for this reference, it said that 'For Internet email account. such as Outlook.com or Gmail, the combined file size limit is 20 megabytes (MB) and for Exchange accounts (business email), the default combined file size limit is 10 MB.' So you can check related setting with your email attachment of Exchange Server?

    Best Regards,

    Simon


    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.

    Tuesday, August 28, 2018 2:29 AM
    Moderator