Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's not required to insert/update/delete any records in the database when executing an action on a VisualForce page. You can leverage the <a href="http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_email_outbound.htm" rel="nofollow">Outbound Email</a> functionality to send out your notification. For something like this, you will probably want to familiarize yourself with the <a href="http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_email_outbound_single.htm" rel="nofollow">SingleEmailMessage</a> methods.</p> <p>A simple example to get you going:</p> <pre><code>public PageReference actionSend() { String[] recipients = new String[]{'myemailaddress@somedomain.com'}; Messaging.reserveSingleEmailCapacity(recipients.size()); Messaging.SingleEmailMessage msg = new Messaging.SingleEmailMessage(); msg.setToAddresses(recipients); msg.setSubject('Test Email Subject'); msg.setHtmlBody('Test body including HTML markup'); msg.setPlainTextBody('Test body excluding HTML markup'); msg.setSaveAsActivity(false); msg.setUseSignature(false); Messaging.sendEmail(new Messaging.SingleEmailMessage[] {msg}, false); return null; } </code></pre> <p>If you are interested in sending these outbound messages from a dedicated email address (something like noreply@somecompany.com), you can set these up through the Setup -> Administration Setup -> Email Administration -> Organization-Wide Addresses menu. Once you have created an org-wide address, grab the Id from the URL and use the <code>setOrgWideEmailAddressId(Id)</code> method on your instance of <code>Messaging.SingleEmailMessage</code>. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload