A Sage CRM implementation project may have a requirement whereby an email must be sent from a screen built using the .NET API.
The MessageBlock object can be used to send emaisl where user interaction is required, i.e. the email edit screen is displayed.
There is no native method within the Sage CRM .NET API that allows the automated sending of emails using templates.
However, this operation would not be very complex. The following method is suggested:
- Check Custom_Sysparams for the SMTP server details.
- Load the CRM records that you want to send the message to.
- Load your template (this an the previous step may be swapped if you want a user to be able to dynamically select templates).
- Create your emails, replacing the field placeholders (e.g. %comp_name%) with data from the Record object. You may want to add additional handling for the current user.
- Send your emails using the classes available in the System.Net.Mail namespace.
More information is available by following the links below: