Skip to main content
Answered

How to create dynamic mail avatars from sender same way as in "Personal" mail template?


I am on my way creating my first mail template and want to use the tiny avatar image at the bottom of the mail showing the profile picture from sender. I saw this in the default mail template "Personal" – but could not find a variable or similar to implement this into my custom mail template.

 

Please help :)

Best answer by Milan

It's not dynamic content. You can have only {{ content }} and {{ unsubscribe_link }} OR {{ unsubscribe_url }} that you can use.

 

But there might be a workaround for this. I haven't tested it but I think it might work.

As attributes are used in the same way as the above dynamic elements, i.e. {{ custom_data.name_of_attribute | fallback:"ENTER FALLBACK HERE" }} where "name_of_attribute" is the custom attribute you have defined, for each user, and let's assume that it is the account owner (and the person you want to have as a sender of the email).

 

So, i.e. your contact Milan has account_owner = Joe and account_owner_avatar_url = www.yourdomain.com/avatars/joe.png

Other contact, Marco, might have account_owner = Jane and account_owner_avatar_url = www.yourdomain.com/avatars/jane.png

 

Then you can use it in HTML such as (note below where I'm using these attributes as a dynamic content):

<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; color: #545454; font-family: 'Helvetica',Arial,sans-serif; font-size: 13px; line-height: 20px; margin: 0 auto; max-width: 100%; width: 100%" class="message_footer_table">
<tbody><tr>
<td width="40" class="space">&nbsp;</td>

<td valign="middle" width="50" style="color: #272727;" align="left">
<img src="{{ account_owner_avatar_url }}" height="40" width="40" class="avatar" alt="intercomavatar">
</td>
 
<td class="admin_name" style="color: #999999">
<b>{{ account_owner }}</b> from YourCompany
 
</td>
</tr>
</tbody></table>

 

So Milan will get the email with Joe as a signature/avatar, and Marco will get it with Jane.

 

That should work, give it a test and report back please 🙂

 

View original
Did this topic help you find an answer to your question?

2 replies

Milan
Expert User ✨
Forum|alt.badge.img+5
  • Top Expert
  • 306 replies
  • Answer
  • August 30, 2022

It's not dynamic content. You can have only {{ content }} and {{ unsubscribe_link }} OR {{ unsubscribe_url }} that you can use.

 

But there might be a workaround for this. I haven't tested it but I think it might work.

As attributes are used in the same way as the above dynamic elements, i.e. {{ custom_data.name_of_attribute | fallback:"ENTER FALLBACK HERE" }} where "name_of_attribute" is the custom attribute you have defined, for each user, and let's assume that it is the account owner (and the person you want to have as a sender of the email).

 

So, i.e. your contact Milan has account_owner = Joe and account_owner_avatar_url = www.yourdomain.com/avatars/joe.png

Other contact, Marco, might have account_owner = Jane and account_owner_avatar_url = www.yourdomain.com/avatars/jane.png

 

Then you can use it in HTML such as (note below where I'm using these attributes as a dynamic content):

<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; color: #545454; font-family: 'Helvetica',Arial,sans-serif; font-size: 13px; line-height: 20px; margin: 0 auto; max-width: 100%; width: 100%" class="message_footer_table">
<tbody><tr>
<td width="40" class="space">&nbsp;</td>

<td valign="middle" width="50" style="color: #272727;" align="left">
<img src="{{ account_owner_avatar_url }}" height="40" width="40" class="avatar" alt="intercomavatar">
</td>
 
<td class="admin_name" style="color: #999999">
<b>{{ account_owner }}</b> from YourCompany
 
</td>
</tr>
</tbody></table>

 

So Milan will get the email with Joe as a signature/avatar, and Marco will get it with Jane.

 

That should work, give it a test and report back please 🙂

 


  • New Participant
  • 4 replies
  • December 13, 2024

Hi, we are also trying to put our profile picture in the signature. I tried the html code, but could not get it to work. Do you have a other solution or do we use the code wrong?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings