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
svidyansvidyan 

'Send Mail' page

Hi,

 

In the default  'Contacts' tab, there is a 'Send an Email'  button in the Activity History section.

Clicking on the 'Send an Email' button brings up a nice VF page to send email.

 

I want a similar functionality in my app. How do I access the same VF page to send email?

 

thanks

svidyan

Best Answer chosen by Admin (Salesforce Developers) 
hitzhitz

hi, svidyan

 

use below code in ur controller

 

public PageReference sandanEmail()
{
          return new Pagereference('/_ui/core/email/author/EmailAuthor');

}

 

use below code in your page...

 

<apex:commandButton id="btn" action="{!sandanEmail}" value="Sand An Email"/>

 

Hitesh N. Patel

 

 

 

 

 

All Answers

hitzhitz

hi, svidyan

 

use below code in ur controller

 

public PageReference sandanEmail()
{
          return new Pagereference('/_ui/core/email/author/EmailAuthor');

}

 

use below code in your page...

 

<apex:commandButton id="btn" action="{!sandanEmail}" value="Sand An Email"/>

 

Hitesh N. Patel

 

 

 

 

 

This was selected as the best answer
Mattias NordinMattias Nordin

You can also have any field pre populated by adding the field values into the url. You need to know the name of the fields though. I have documented the fields i have found so far here:

http://mattiasnordin.net/web08/t5/forum/forum_posts.asp?TID=20

svidyansvidyan

This is great. Thanks a lot.