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
mlundwallmlundwall 

Sending email to non contacts

Hi,

 

We have Email-To-Case and use the email list to send and recieve emails that are collected on that case. However I haven't found a way to send emails to someone that isn't a contact.

 

It is unfortunatly not an option to create a new contact for each new email.

 

How do I send emails from within salesforce to arbitrary addresses?

 

/regards

Martin

Shashikant SharmaShashikant Sharma

How are you sending email from code?

If yes then you can definitly send to an arbitary email , yes but as tager object id you can only specify only a few object itd like contact ,lead so that you can use merge fields as well in case of using email template.

 

So answer to your question is yes you can send email to any email id jus provide that like this

 

String[] toAddresses = new String[] {'user@acme.com'}; 

String[] ccAddresses = new String[] {'smith@gmail.com'};  
// Assign the addresses for the To and CC lists to the mail object.     

 mail.setToAddresses(toAddresses);

mail.setCcAddresses(ccAddresses);

 

see this for more

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_email_outbound.htm

mlundwallmlundwall

I am sending email via the Emails related list on the Case object.

 

It is a email form so that you can have email conversations regarding a case on the case it self.

 

So unfortunatly it is not via code.