+ Start a Discussion

Visualforce Email

Is it possible to set the "from" field using a visualforce email? I am unable to work it out and i have a need for it, i have an org with 2 org wide email addresses and need to define the from address in the VF email - its for customer case comments otherwise i would use a workflow




Use this..



Magulan D

Salesforce.com certified Force.com Developer.



If this post is your solution, kindly mark this as the solution and give Kudos.


where abouts do i put that tag as it doesnt auto populate when i type it into the VF page editor?


this is my email template at the moment 


<messaging:emailTemplate subject="Case Update" recipientType="Contact" relatedToType="Case" >

<messaging:htmlEmailBody >


<table border="0" cellspacing="0" cellpadding="0" width="449">
    <td height="147" colspan="2" valign="top"><p>Dear {!relatedTo.Contact.name}, </p>
      <p>With regards to case reference number {!relatedTo.CaseNumber} that you logged with us on {!relatedTo.CreatedDate}, the latest update is as follows: </p>
      <p>Kind regards, </p></td>
    <td width="449" valign="top"><p><strong>XX Support </strong><strong> </strong></p>
      <p>Email&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:support@easytrace.co.uk">support@easytrace.co.uk</a></p>
      <p>Support + 44 (0) 8450 71 46 67<br />
        Fax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   &nbsp;&nbsp;+   44 (0) 8456 71 71 02</p>
      <p><a href="https://twitter.com/intent/follow?original_referer=https://twitter.com/about/resources/buttons&amp;region=follow_link&amp;screen_name=_EasyTrace&amp;tw_p=followbutton&amp;variant=2.0"><img border="0" width="61" height="24" src="https://c.eu0.content.force.com/servlet/servlet.ImageServer?id=01520000001HLqQ&amp;oid=00D20000000CjM5" /></a><a href="http://www.linkedin.com/company/ami-education"><img border="0" width="60" height="22" src="https://c.eu0.content.force.com/servlet/servlet.ImageServer?id=01520000001HLqV&amp;oid=00D20000000CjM5" /></a></p></td>
    <td width="245" valign="bottom"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img border="0" width="143" height="56" src="https://c.eu0.content.force.com/servlet/servlet.ImageServer?id=01520000001HLqL&amp;oid=00D20000000CjM5" /></p>
      <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p></td>
    <td width="449" colspan="2" valign="top"><p>&nbsp;</p>
      <p>AMI Education Solutions Ltd | Hithercroft Road I Wallingford |   Oxfordshire I OX10 9BT <br />
        _______________________________________________________________________________ </p>
      <p>XX Ltd: STATEMENT OF   CONFIDENTIALITY: This email and any files transmitted with it are   confidential and intended solely for the use of the individual or entity to   whom they are addressed. If you have received this email in error please   notify the system manager. Please note that any views or opinions presented   in this email are solely those of the author and do not necessarily represent   those of the company. Finally&nbsp; the recipient should check this email and   any attachments for the presence of viruses. The company accepts no liability   for any damage caused by any virus transmitted by this email. This email has   been scanned with Trend Micro antivirus. </p></td>
Related to: {!relatedTo.Thread_ID__c}