function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DilluSalesForceDilluSalesForce 

How Many Ways to Send An Email...????

Hi,

     Can i know how many ways are there to send and email using Apex Code (for example SMTP,FTP)....in this way may i know the different ways.

Is there any way to send in different formats/ways....????

Rasmus MenckeRasmus Mencke

You can either use the SingleEmailMessage or MassEmailMessage API to send emails.

 

Another option is to look at callOuts to send a message somewhere, but it is somewhat limited, in that you can only do 10 callOuts per session

DilluSalesForceDilluSalesForce

Thanx for the replay...

 

Ya i know dat we use SingleEmailMessage and MassEmailMessage for sending email..but apart from dat do we have any other way to send email using apex code without exceeding governor  limits.

sfdcfoxsfdcfox
You could create a callOut to a server that accepts connections from Salesforce, gets input into a CGI script of some sort, then sends it from another SMTP server. Governor limits are in place to prevent unreasonable usage of Salesforce resources, so you might consider using your own resources governor limits are the problem. Make sure you have appropriate security, or you'll have an open relay (a Very Bad Thing).