+ Start a Discussion
Ankit Singh 6Ankit Singh 6 

Using fromAddress for sending email through salesforce

Hi All

We have integrated salesforce api using WSDL in C#. We are trying to send email through our code using salesforce template.
We are unable to provide fromAddress as we are not finding any option for that. Please check the below code : 

SingleEmailMessage message = new SingleEmailMessage();
                message.emailPriority = EmailPriority.High;
                message.saveAsActivity = false;
                message.useSignature = true;
                message.templateId = templateId;
                message.targetObjectId = CrmId;
                SingleEmailMessage[] messages = { message };
                SendEmailResult[] results = _sf.sendEmail(messages);

Please let me know a wayto provide fromAddress for sending mails.

Regards
Ankit