You need to sign in to do that
Don't have an account?
IX Salesforce Admin
Send email using a custom button
Hello,
we are trying to send an email using a custom button. The email is intended for a specific email address. This is the code we are using:
unfortunately this is the error message we are getting.
what are we doing wrong?
Thank you.
we are trying to send an email using a custom button. The email is intended for a specific email address. This is the code we are using:
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")} var message = new sforce.SingleEmailMessage(); message.setToAddresses = 'test@test.com'; message.plainTextBody = 'It would be so awesome if this worked.'; message.setCcAddresses = 'test2@test.com'; message.setBccAddresses = 'test3@test.com'; message.setSubject = 'Data upload report'; var result = sforce.connection.sendEmail([message]); alert(result);
unfortunately this is the error message we are getting.
what are we doing wrong?
Thank you.
http://salesforce.stackexchange.com/questions/78789/custom-button-to-send-an-email-using-email-template
thank you for the reply. Both examples are explaining how to use a template, I am trying to avoid this. Can't I simply define recepients, subject and body?