Send Emails Via APEX API in Eclipse

Many customers and partners have a need to send emails when building integrations with salesforce.com.  With the APEX API’s you can now leverage the platform to send emails.

You can send individual emails to email addresses, contacts, leads or users, and additionally you can CC or BCC email addresses to the email you are sending.

Mass Emails can be sent to contacts, users or leads, using templates. The API provides an option to save the email as an activity on the contact or lead you are sending the email to.

To see a code example and learn more about send emails through the APEX API click here.

For an example of using the sendEmail API in an scontrol, click here.

Below is a snippet of code to give you an idea of how easy it is to get started sending email on the platform.  We hope you can make use of this great new feature when leveraging the API to extend the platform!  

	       
sendEmailResults = binding.sendEmail(new SingleEmailMessage[] {email});
       
        System.out.println(sendEmailResults);
       
           for (SendEmailResult sendEmailResult : sendEmailResults) {
                   if(sendEmailResult.isSuccess()){
                         System.out.println("success");
                   } else{
                         System.out.println("error");
                   }
           }

 

Published
July 3, 2007
Topics:

Leave your comments...

Send Emails Via APEX API in Eclipse