SMTP details for Custom Emails from COM API

By | January 4, 2014

Outbound e-mails and inbound e-mails are essential for any CRM. When you use CRM it becomes essential that inbuilt email editors and settings are configurable to support standard as well as custom modules.
The New Stuff: Download Documents from Self-service site
In SageCRM we have outbound email configurations like below.

Image-1

This works perfectly when sending emails through the email editors and CRM email functionalities.
In some cases, we might need some out of the box solution to fulfill client’s requirement, hence we customize CRM to send email through TLS or COM API. If you want to use MAPI configurations, you have to store all these details in configuration files which is not safe.
Other way is to query Custom_SysParams table to get SMTP details from the CRM database and pass those details to our email routine.

Image-2

You can see SMTP password in parameters table is in encoded format so we cannot pick it up directly. Well, there is a standard method to decode it when you are using COM API. The syntax is as follows.
var DecodedPassword = eWare.CheckFormat(<Paramater:Encrypted Password>)
Now as you have all the authentication details for SMTP server, you can use any methodology based on SMTP authentication to send emails from COM API.
Also Read:
1) Using ArgoSoft Email server with Sage CRM
2) Send an Email once Case is Created/Closed in the Sage CRM
3) Disallow sending emails using outlook
4) Invalid eWare user name error in Email Manager Service log
5) Embedded Images in Email Templates