
Sometimes you just want to place a MailTo Link on an InfoPath Form. This link only open your favorite mail client application and fields like subject, body or mailto are filled out by data from the InfoPath form.
Just add a hyperlink button to your InfoPath form and add something similar to the pseudo syntax:
concat(“mailto: “; “MailAdress” ; “?subject=ANYWORDS &body=ANYBODY, “%0D%0A%0D%0A” , “ANYBODY NEXT LINE”)
That’s it. Now you are able to click on a link within InfoPath and a new mail message will be open by e.g. Outlook.
For special chars in mail body use the following ASCII Table:
Example:
& => %26
CR => %OD
Hello
I followed your instructions and it works just fine, but i have another question, when my manager clicks on the link it opens up the email box which is great but it also opens internet explorer with error and he needs to click on back arrow to go back. Is there any way we can avoid this?? In other words when he clicks on the form it opens email box and the form stays as it is.
Any help would be great!!!
Thanks in Advance
Hi Rahul, please let me know how your mailto link looks like, normally it should not open an Internet Explorer.
Which version of IE do you use?
If you need a good html encoder http://meyerweb.com/eric/tools/dencoder/
Hi
Unfortunately, this gives bad results under Internet Explorer 8 and 9 (Windows 7). Because of the “protected mode” feature of IE, when you click on a mailto: link, first your page is replaced with the about:blank, then the mail window is open.
I did not find any solution on the net : the only choice is between the “mailto”: standard basic HTML link usage, or the protected mode. Disabling the protected mode (go to IE options, Security tab) solves the about:blank problem, but you get an alert message on top of your pages, that you can’t get rid of.
It’s a pity that Microsoft did not find any solution to this, even in the latest versions of IE. I really like IE10, but this sort of bug is forcing me to use other browsers.
Here are a few links I found about the subject:
http://social.msdn.microsoft.com/Forums/ie/en-US/94d6a162-6a4c-4630-a272-dc33060bcf61/ie8-protected-mode-windows7-turn-onoff-with-javascript?forum=iewebdevelopment
http://stackoverflow.com/questions/1674527/mailto-causing-a-blank-page-in-ie8-when-used-with-dojo/1733253#1733253
I am attempting to add a MailTo link on infopath and I keep receiving errors. I don’t need the subject or body filled out. Just the “to”. here’s what I’ve got:
My formula: mailto:UserEmail
the error:
Expected value type: end-of-string
Actual value: ..
mailto:–>..<–/my:UserEmail
Any help would be greatly appreciated.
Is there any way to make the link have a target:”_self” so that it doesn’t open a new window?
Update:
I took this apart and took baby steps to rebuild it and it started to work. Here’s what I have so far
concat(“mailto:”, IntEmailTo1, “?subject=”, IntTitleTo1, “&body=This is my body”)
You can also refer to that tool as well, https://url-decode.com/. As compared to your mentioned tool that tool provides more facility for the encoding.