I'm new to Dynamics 365, and I was using dynamic content to create a URL to an image file in an email template. This content has a space in the output, which in Gmail has an issue, where it replaces the space with a + symbol. It seems to work in other email services. Is there a way to replace the space in the dynamic content with another character? I was doing a little research and it seems like Dynamics 365 uses handlebar.js, but it seems like Dynamics 365 doesn't support most of its features.
This is my sample code in the HTML of the email template:
<img alt="" src="https://www.testurl.com/{{contact.contact_account_parentcustomerid.contactname}}.png">
Ideally, I want to replace spaces in the contactname with a hyphen and rename the image files. I can't change the original dynamic content value because I use the contactname in other parts of the email template.
Related
Question: Has anyone had any luck forcing Sendgrid Dynamic Templates to use © with a text module inside a single-column layout? It always produces the non-ASCII © for me.
Detail
Gmail penalises any content that contains non-ASCII characters. When it detects this it shows the "Message clipped" message at the bottom. This is not an ideal professional look.
The source of this for us was the © copyright symbol. This is because Sendgrid Dynamic Templates always passes this directly with non-ascii version instead of using html-escaped ©
I tried to get around this by editing the html and forcing © but the editor simply replaced it with the bad © char each time.
Steps to reproduce:
Create a single column layout with a text module inside. Add “Test copyright ©”
Edit module HTML for text component. It will initially have the © Symbol in there
Change to be html-escaped © and click Update
Repeat step (2) to view the source and the source code will contain the unescaped copyright © symbol. This will continue to cause "Message clipped"
I've raised a request with SendGrid as I think this is a bug, but a note for others meanwhile is that you can work around this by:
Creating a Code component inside your single-column layout,
Copy any styling you want from the original Text element by viewing the source
You may also need to copy any padding, line-height from the table of the original text element by viewing the source of the generated template
This got me my outcome, but obviously isn't as easy to allow non-tech authors to maintain the content.
Update 9 Feb 2023
SendGrid support have confirmed the bug with all rich text editors. Copyright symbol is always replaced with unicode character instead of html escape code. Should ideally always convert known special characters to html escape codes, but at a minimum it should honour when someone overrides in the code section rather than replacing it. Bug raised, no ETA or idea of internal prioritisation. Meanwhile workaround above will get you by ... just makes it harder for non-technical authoring.
I have a button to send an e-mail message. This opens a new e-mail but the problem is that the subject and the body text are not added to the e-mail message. This is what I have so far that is not working:
<input style="background: #4a5e70; color: #ffffff;" type="button" value="REQUEST INVITE" onclick="window.location.href='mailto:me#any.com’;” subject=“Request%20invite;body=Hallo%20you;”/>
In almost every language (PowerShell is one exception), text strings are delimited by typewriter quotes (' and ") not typographic quotes (‘, ’, “ or ”). You should replace your quotes like so:
onclick="window.location.href='mailto:me#any.com?subject=Request%20invite&body=Hallo%20you'"
The onclick attribute is written as a single string (delimited by double quotes) whose href whose value is a single string (delimited by single quotes) expressed as a URL-encoded query string.
Note also that you can’t rely on mailto links working unless users have configured a local email client correctly.
See the Mailto Wikipedia article and this related question for more information.
I've been searching for days for an answer to this issue. I'm trying to append an Access field to a base URL to customize each email in my merge like so: http://www.example.com/myItems.asp?ItemID={field}.
I tried several approaches in Word 2007, then gave up and finally tried Publisher after coming across this post - MS Word: Mailmerge hyperlinks with query get URL string with a MERGEFIELD.
In Publisher, I got everything to merge properly including the custom links (according to preview), but when I hit "send email" it wasn't passing the emails to Outlook - said 0 message(s) sent. I tried again, using a blank email template and got it to pass the email, but the email showed field names rather than the merged data.
Coming across this article regarding the field names - http://msgroups.net/microsoft.public.publisher/emailmerge-not-working-in-publishe/213664 - I clicked outside the text box as suggested before sending email but still, the field names show and not the merged data.
I'm super frustrated and exhausted. This shouldn't be this difficult! Any ideas or suggestions would be appreciated.
This shouldn't be this difficult!
I agree. I can't help on the Publisher front, but this link should help for Windows Word.
To summarise, when you insert the HYPERLINK field, do it this way:
Use ctrl-F9 to insert a field code brace pair { }
Type HYPERLINK between the braces
Select the field and update it once (F9)
Do not update this field code again. If you do, Word will always insert the same link text (i.e. the hyperlink target). People working with fields often select F9 quite a lot just to make sure things are up to date, so you have to try not to do that.
If you Alt-F9, you should see that the display text is an error message (starting with "E" in the ENglish language version of Word).
Move the insertion point so it is immediately after the E. Type the display text that you want, or, if you want a variable display text built from text + MERGE fields etc, enter that text and those codes).
Carefully remove the "E" and the other part of the error text.
Use ALt-F9 again to display the HYPERLINK field code. Click after the K, type a space, then enter the following fields and text, assuming your variable text is coming from a MERGE field called fieldname:
"{ SET X 1 }http://www.example.com/myitems.asp?ItemID={ MERGEFIELD fieldname }"
(The SET field is there to stop Word doing something else wrong. If you have more than one HYPERLINK field, you will need to SET a different variable name (X1, X2 etc.) in each HYPERLINK). This is discussed in more detail here - interestingly enough, that question was also about merge to HTML email, but I think you also have to do the additional stuff I mention above to make it all work.
I have a similar problem to this question, but could not find any useful information in the answers.
I'm trying to send an email to a recipient with a display name Lastname, firstname using the Quoted-Printable encoding. The exact header, as seen in the source of the received email, is:
To: =?UTF-8?Q?"Lastname,=20firstname"?= <email#example.com>
However, Outlook displays it like this:
Effectively interpreting the comma as a separator between recipients, even though it's enclosed in a Quoted-Printable encoding.
When there is no comma, the header is properly interpreted.
Am I doing something wrong, or is it impossible to use commas in a display-name?
Note: I'm currently using Amazon SES and the ZF2 Zend\Mail component, but the tools should not matter, I'm only interested in the correct header format and will adjust my tools or code accordingly.
What you are seeing is not correct behavior as far as I can tell, but the workaround should be obvious: QP-encode the comma. The double quotes are redundant and should be omitted:
From: =?UTF-8?q?Lastname=2C_Firstname?= <email#example.com>
(As such, it is obviously insane to put the last name first; but e.g. Outlook connected to Active Directory seems to insist on this silly anti-convention.)
I wanted to restore some of the lost notes that I obtained by using an iTunes backup (of an iphone 4) and opening up the notes.sqlite file. When I query the table that contains the notes text:
select zcontent from znotebody
I get the text that is in html format. How can I convert those entries to a more readable content? It doesnt have to be perfect, just enough to be able to read it. Here is an example of a note:
Meds fir odd<div>Trazadone</div><div>Effexor (& Cd)</div><div>Buspirone</div><div>Clonodine</div><div>Nortriptyline</div><div>Risperdal</div><div>Straterra </div>
Here is the actual note from above:
Meds fir odd
Trazadone
(Effexor & Cd)
Buspirone
Nortriptyline
Risperdal
Straterra<space here>
If you just want to retrieve the note text, I would try this
select "" + zcontent + ""
from znotebody
Then save to a file and open in browser
You have to look some NSString categories, to escape html tags in your text.
Follow this link will help to solve the issue.. Objective C HTML escape/unescape