Have you ever wanted to send a more personalized email to a customer or client with information about their representative at your company? This article will explain how to send an email to a lead or contact containing a dynamically added image of their record owner.
[tab name="CRM 2013"]
The user records can be found at Setting > Administration > Users
You can associate an image with a user record by placing a link to the image in the Photo URL Field. If you do not have a photo URL field on your user records, you can add it by opening the customize tab on the record, then click the design form button, find the photo URL field in the field list, drag and drop it onto the form, then save and publish the change. You’ll need to have the image hosted online somewhere and then in the user records put the URL for that user’s image in the field. It is recommended that you upload those images in the size you want them to display in the email.
Note that if you are using the Block Editor, make sure to use an HTML type block to do the following. First, using the Image Manager, insert an image that is the same width and height that you’d like the user record image to be into the email template as a placeholder. Next, right click on the image and in the Img Src field remove what is there and put this: ${Recipient.systemuser.photourl[0]!”}
(If you use a custom field, note that the quotes should be changed to single quotes – this is so the HTML will work. So, If you are receiving a render error with the code above, replace the quotation mark with two apostrophes.)
The image in your template will now NOT display because the URL is not populated until the email is sent. It will also NOT display if you TEST the email. When you actually send the email the image will display in the same location where you initially placed the placeholder image.
An alternative method to display the image is to place an image tag into your email template’s HTML and use ${Recipient.systemuser.photourl[0]!”} as the img src. Note that the quotes there are two single quotes.
<img src=”${Recipient.systemuser.photourl[0]!”}” width=”299″ height=”299″>
[/tab]
[tab name="CRM 2011"]
The user records can be found at Settings > System > Administration > Users
You can associate an image with a user record by placing a link to the image in the Photo URL Field. If you do not have a photo URL field on your user records, you can add it by opening the customize tab on the record, then click the design form button, find the photo URL field in the field list, drag and drop it onto the form, then save and publish the change. You’ll need to have the image hosted online somewhere and then in the user records put the URL for that user’s image in the field. It is recommended that you upload those images in the size you want them to display in the email.
Note that if you are using the Block Editor, make sure to use an HTML type block to do the following.
First, using the Image Manager, insert an image that is the same width and height that you’d like the user record image to be into the email template as a placeholder. Next, right click on the image and in the Img Src field remove what is there and put this: ${Recipient.systemuser.photourl[0]!”}
(If you use a custom field, note that the quotes should be changed to single quotes – this is so the HTML will work. So, If you are receiving a render error with the code above, replace the quotation mark with two apostrophes.)
The image in your template will now NOT display because the URL is not populated until the email is sent. It will also NOT display if you TEST the email. When you actually send the email the image will display in the same location where you initially placed the placeholder image.
An alternative method to display the image is to place an image tag into your email template’s HTML and use ${Recipient.systemuser.photourl[0]!”} as the img src. Note that the quotes there are two single quotes.
<img src=”${Recipient.systemuser.photourl[0]!”}” width=”299″ height=”299″>
[/tab]
[end_tabset]