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 :
Finance | Project Operations, Human Resources, ...
Answered

Error when send as email attachment.

(0) ShareShare
ReportReport
Posted on by 79

Am facing issue when sending email as attachment in my dev environment. The same code is working in production server. 

I am able to send normal email by executing code in job and seems emails parameters are configured correctly.

Please find below error

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.Mail.SmtpException: Mailbox unavailable. The server response was: 5.7.1 Client does not have permissions to send as this sender

   at System.Net.Mail.DataStopCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse)

   at System.Net.Mail.DataStopCommand.Send(SmtpConnection conn)

   at System.Net.ClosableStream.Close()

   at System.Net.Mail.SmtpClient.Send(MailMessage message)

   at Dynamics.Ax.Application.SysMailerNet.Sendmail() in SysMailerNet.sendMail.xpp:line 13

   at Dynamics.Ax.Application.SysMailerNet.Quicksend(String fromAddr, String toAddr, String subject, String body, String cc, String attachments, Boolean , Boolean ) in SysMailerNet.quickSend.xpp:line 159

   at Dynamics.Ax.Application.SysMailerNet.Quicksend(String fromAddr, String toAddr, String subject, String body, String cc, String attachments)

   at Dynamics.Ax.Application.SrsReportRunMailer.Emailreport(SrsReportEMailDataContract _emailContract, String _attachmentPath) in SrsReportRunMailer.emailReport.xpp:line 24

 

   --- End of inner exception stack trace ---

Please let me know if I need to check any setups or any help is highly appreciated.

I have the same question (0)
  • István Orosz Profile Picture
    2,137 on at

    Did you checked the permissions you have on your devbox as developer? Do you have the sufficient ones, comparing to the Prod environment?

  • srikanth_ax Profile Picture
    79 on at

    Thanks for your reply, Yes I have same admin permissions for both environments.

  • Verified answer
    kvnkk Profile Picture
    800 on at

    Check the folder permissions( where the attachments stored)  and make sure the same permission like Prod environment. I think better to place attachments in network shared folder and try.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 456 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans