Forum Discussion
christopher_gillis
8 years agoCommunity Manager
Hello,
This should be possible by using a onAfterAdd/onAfterUpdate Server Event on the Document File ItemType. You can check that all of the mandatory fields have some data in them and then use the System.Net.Mail.MailMessage class available through .NET in order to construct your email, attach the related file, and then send the email to your user's email address.
You can find a standard example of how to use the MailMessage class to send an email near the bottom of this page outlining the API. One thing to note is that by default, you will need to fully qualify the class path within your server method. Instead of simply using MailMessage as in the example, you will need to use System.Net.Mail.MailMessage.
Chris
___________________________________
Christopher Gillis
Aras Labs Software Engineer
paul_sheehy
2 years agoIdeator III
Hey Chris. A few years ago, I successfully deployed the MailMessage class in an Aras method and sent an email with attachment. This was when my Aras instance was on prem. If I move to Enterprise SaaS, is emailing via MailMessage class compatible?
I am testing this now and it is timing out.