You need to sign in to do that
Don't have an account?
ptran123
email.setPlainTextBody() and email.setHtmlBody() together.
I looks like Messaging.SingleEmailMessage provides both of these methods. I was wondering if I can set both the plain text and the html for this email. Then, depending on the recipient's email configuration, one's email reader will choose the appropriate content. Thanks in advance.
That's the right behavior, you can define both.
The email sent will contain both.
The client email reader with use only one
I assume that I just need to make those two calls. I don't have to set anything else, right?
You make those two calls, call setToAddresses(), call setSubject() and then sendEmail()