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)

Error in attaching file when sending email in AX 2009

(0) ShareShare
ReportReport
Posted on by 11,633

Hi All,

While attaching file using Sysmailer object, I am getting error below error:

Method ‘send’ in COM object of class ‘CDO.Message’ returned error code which means: Access is denied. 

I already tried to google it, but haven't found any solution to this issue. There are two folders, for one folder the attachment code is working fine, but for the newly created folder I am getting this error. I have assigned all the access which the working folder have, but no luck and still getting the same error message every time. Can anyone please help me resolve this issue. This is driving me nuts and I already 4 to 5 hours trying to resolve this issue.

Thanks,

SB.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Tommy Skaue Profile Picture
    Moderator on at

    You need to make sure the running code has access to the location of the attachments. If the code is running on the AOS-side, it will be executing as the AOS service account, which normally is a dedicated user. In addition, the AOS needs to have access to the actual location, so if you're pointing to an attachment located on your local machine or some path the AOS can't access, it will not work. Use a shared folder and make sure both you as user have access, and the AOS has access.

  • syed baber Profile Picture
    11,633 on at

    Hi Tommy,

    The folder is on the machine where AOS is hosted. Another folder with the different name is working fine and email is being sent with the attachment. But the client has created a new folder for customer invoice email attachment. I have provided all the access to this new folder which other folder have, but I am getting error at the time of attachment. AOS service is running with Local System account. I am wondering how the attachment with in another folder is working fine, but not this new folder.

    Thanks,

    SB.

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans