Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Table of Contents
maxLevel3
typeflat

Overview

The following operations allow you to work with sObjects. Click an operation name to see details on how to use it.

OperationDescription
Working with EmailssendEmailCreates and sends an email using Salesforce.
Working with EmailssendEmailMessageSends emails that have already been drafted in Salesforce.

 

Anchor
sendEmail
sendEmail
Creating and sending an email

To create and send an email, use salesforce.sendEmail and specify the following properties. 

Code Block
languagehtml/xml
titlesendEmail
<salesforce.sendEmail>
    <sendEmail xmlns:sfdc="sfdc">{//sfdc:emailWrapper}</sendEmail>
</salesforce.sendEmail>
Properties
  • sendEmail: XML representation of the email.
Sample
Code Block
<payloadFactory>
   <format>
     <sfdc:emailWrapper xmlns:sfdc="sfdc">
     <sfdc:messages type="urn:SingleEmailMessage">
        <sfdc:bccSender>true</sfdc:bccSender>
        <sfdc:emailPriority>High</sfdc:emailPriority>
        <sfdc:replyTo>123@gmail.com</sfdc:replyTo>
        <sfdc:saveAsActivity>false</sfdc:saveAsActivity>
        <sfdc:senderDisplayName>wso2</sfdc:senderDisplayName>
        <sfdc:subject>test</sfdc:subject>
        <sfdc:useSignature>false</sfdc:useSignature>
       <sfdc:targetObjectId>00390000001PBFn</sfdc:targetObjectId>
       <sfdc:plainTextBody>Hello, this is a holiday greeting!</sfdc:plainTextBody>     
     </sfdc:messages> 
      </sfdc:emailWrapper>
    </format>
    <args/>
</payloadFactory>
         
<salesforce.sendEmail>
    <sendEmail xmlns:sfdc="sfdc">{//sfdc:emailWrapper}</sendEmail>
</salesforce.sendEmail>
Related Salesforce Documentation

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_sendemail.htm

Anchor
sendEmailMessage
sendEmailMessage

Sending existing email drafts

To send emails that have already been drafted, use salesforce.sendEmailMessage and specify the IDs of the emails you want to send. 

Code Block
languagehtml/xml
titlesendEmailMessage
<salesforce.sendEmailMessage config-ref="connectorConfig">
    <sendEmailMessage xmlns:sfdc="sfdc">{//sfdc:emails}</sendEmailMessage>
</salesforce.sendEmailMessage>
Properties
  • sendEmailMessage: XML representation of the email IDs to send.
Sample
Code Block
<payloadFactory>
    <format>
        <sfdc:emails xmlns:sfdc="sfdc">
            <sfdc:Ids>0019000000aaMkK</sfdc:Ids>
            <sfdc:Ids>0019000000bbMkK</sfdc:Ids>
        </sfdc:emails>
    </format>
    <args/>
</payloadFactory>

<salesforce.sendEmailMessage config-ref="connectorConfig">
    <sendEmailMessage xmlns:sfdc="sfdc">{//sfdc:emails}</sendEmailMessage>
</salesforce.sendEmailMessage>
Related Salesforce Documentation

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_send_email_message.htm