web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Unable to send email to multiple addresses using sysmailer

(0) ShareShare
ReportReport
Posted on by 515

Hi all,

I am using sysmailer class to send email. When i pass single email id and test it sends the email but when i am passing same email ids or multiple email ids then it give error

“Method send in COM object of class ‘CDO.Message’ returned error code 0x8004020F(unknown) which meNs (unknown)

I tried to take all email ids into enumerator and passing it one by one but still getting same error. Pls help.

*This post is locked for comments

I have the same question (0)
  • Samy123 Profile Picture
    455 on at

    I experienced this error before. Do a try catch in the sendMail method of sysmailer class it will give you some details on this error. that will be helpful in debugging.

    try{

       _com.send();

       }

       catch {

           checkFailed(_com.error().description());

       }

  • Mea_ Profile Picture
    60,284 on at

    Hi Shri,

    Do you use ";" as delimiter ? Also did you try to use SysMailerNet class?

  • Dhanshri Profile Picture
    515 on at

    Hi ievgen,

    In SysMailer class.>AppendAddress (), it combines multiple addresses by , only .Is there any way from where we can change this setting to ';'

    Earlier it used to work with Sysmailer class only . recently SMTP server settings are changed . Since then we are facing this problem.

    Thoday thr job I am able to send email to multiple address (Email Id was same) but if i run Batch job then it is again throwing the above error.

    Is there any setting on SMTP side which needs to be change in order to allow ','?

    Please suggest.

  • Dhanshri Profile Picture
    515 on at

    Sysmailernet class is not present.Based on usergroup we are selecting number of users and passing their email ids one by one to mailer.tos.appendaddress method.

  • Mea_ Profile Picture
    60,284 on at

    If you do not have this class then you have old version of 2012. You can follow advice to add error handling to see error details or try to find something in smtp logs.

  • Samy123 Profile Picture
    455 on at

    Shri

    ievgen is right put the code in try catch block this will give you some more insight in to this issue.  

  • Dhanshri Profile Picture
    515 on at

    Hi all,

    From inner expression i am getting below message

    Insufficient system storage.the server response was : 4.5.3 Too many recipients ( AS780090)

    One more point i would like to add here is using simple job i am able to send email to multiple recipients but using batch job it is creating issue.

    Pls advice.

  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    It doesn't look like AX issue. How many recipients do you have there ? There is a setup on smtp sever to set max number of recipients, let's say it's 100 and you need to either increase it or use distribution group instead.

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    You probably have a loop and adding too many recipients indeed if it causes storage issues. Did you try to debug the batch in Visual Studio and see what is actually being passed in as recipients? I believe your issue would be with that, or with the configuration/deployment of your SMTP server.

  • Dhanshri Profile Picture
    515 on at

    One more thing which i have experienced today is there are 2 server one is dev and one production instnace. If i try to run same batch job on dev instance and i select multiple receipts then it run on dev instance but it is not same case with production instance. Difference is aos servers and the user id with which this batch runs on both the servers. Do i have to check any smtp authentication setup for user who is running batch?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans