You need to sign in to do that
Don't have an account?
Brian Sherman 22
Google Web Fonts not working with Visualforce Templates
HI there,
I have a visualforce email template that I would like to use Google fonts for. My code looks like this:
When I look at the template in the preview it appears fine. When I send a test the email is received with Times New Roman and not the font I saw in the preview.
Any ideas?
I have a visualforce email template that I would like to use Google fonts for. My code looks like this:
<messaging:emailTemplate subject="{!if(RelatedTo.Site__r.State_Province__c='QC','Re: '& relatedTo.Site__r.Name_FR__c & ' ID:'& relatedTo.Name,'Your ' & relatedTo.Site__r.Name & ' Inquiry ID:' & relatedTo.Name)}" recipientType="Lead" relatedToType="Lead_To_Site_Association__c"> <messaging:htmlEmailBody > <html> <head><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:300,400,600,700&lang=en" /></head> <body style="background-color:#ffffff;"> <style> body{ font-family: 'Raleway';} </style>
When I look at the template in the preview it appears fine. When I send a test the email is received with Times New Roman and not the font I saw in the preview.
Any ideas?
Most email clients are very limited in which fonts can be rendered in HTML based emails. If you are viewing the email in Outlook then it will default the font to Times New Roman. When you are setting up the template the reason you are able to see the font they way you want is because it is being rendered in your browser as a webpage.
Did you ever find a way to do this? We're able to do this with great tools like Mailchimp, but once again Salesforce mailing is overly complicated and lagging behind.
Did you have any luck figuring this out yourself?
Like you, it appears correctly in the preview on the Salesforce website, but when using mail clients that support Web Fonts like Google G Suite, it doesn't render correctly.
Have you been able to make your Visualforce email template look the way you want it to?
Thanks for your help (I know it's an old thread, but I'm hoping that you were able to beat Salesforce and actually do what you want to do!)
Best
-j