mailto doesn't work in IE9
-
Monday, April 23, 2012 1:14 PM
The mailto link is not working properly in IE9 windows 7. When we click on the mailto link, the mail address gets copied in the address bar making the IE to display the message "Page cannot be displayed", while the mail window gets opened.
This works fine with IE8 windows 7.
Has anyone faced this issue before and has the solution for the same?
- Edited by Swaroopa a Tuesday, April 24, 2012 12:30 PM
All Replies
-
Thursday, May 03, 2012 1:17 AMModerator
Hi, I tested on my Windows 7 computer with IE9 and found “mailto” works, please reset your IE settings and check the result again.
-
Friday, May 18, 2012 6:45 PM
Hi Swaroopa,
I am also facing the same issue which works in IE 7 but not working in IE 9. Please let me know if you get some workaround on this.
Thanks
Ramesh
-
Sunday, May 20, 2012 10:09 AM
The mailto link is not working properly in IE9 windows 7. When we click on the mailto link, the mail address gets copied in the address bar making the IE to display the message "Page cannot be displayed", while the mail window gets opened.
This works fine with IE8 windows 7.
Has anyone faced this issue before and has the solution for the same?
"When we click on the mailto link, the mail address gets copied in the address bar "
this tells us (since you have not provided a link to your website) that the link is using javascript to launch the mailto protocol...
probably something like...
<a href="#" onclick="window.location='mailto:someone@example.com';">Mail us</a>
the common design pattern IS
<a href="mailto:someone@example.com">Mail us</a>
When asking a question in this technical forum it is helpful if you provide a link to your website....
this forum is for questions about html, css and scripting for website developers using MSIE browsers. If you are not a website developer you are in the wrong forum...
for consumer help with IE select the Help>Online Support menu from IE and follow the prompts for your windows and IE versions... include the address of websites that you are having problems with.
Rob^_^
- Proposed As Answer by doctoroftypeMVP Sunday, May 20, 2012 10:09 AM
-
Friday, June 01, 2012 2:54 AM
Well that answer is kind of harsh, we are in the proper forum. I am a website developer and created a web-based tool with click to copy to clipboard functionality, and it's not working in IE9 either, but it does in earlier versions. The question is a valid question, so any help would really be appreciated!
Thanks!
-
Friday, June 01, 2012 7:40 AM
@Ruh122
nobody has supplied a link to their website or a snippet of how they are using the mailto protocol.
be the first. our answers are only as good as your questions... How else can we comment without viewing your markup and or script.
show us the code...
Rob^_^
-
Friday, June 01, 2012 7:49 PM
created a web-based tool with click to copy to clipboard functionality, and it's not working in IE9 either
Are you implying that mailto: works otherwise (e.g. just enter that in an IE Address bar to test it)? That is a more common problem symptom, which usually indicates that the default E-mail client needs to be re-registered.BTW I agree with Rob; you are not being very forthcoming with details, e.g. what you have done to try to diagnose your symptom or its extent.
--- -
Thursday, October 18, 2012 6:26 PM
This works just fine. I am running the HTML on SharePoint. My browser is IE 9, my OS is Windows 7 and my mail client is Outlook 2010.
<body>
<a href="mailto:someone@mail.ca?subject=banana&body=The message's first paragraph.%0A%0aSecond paragraph.%0A%0AThird Paragraph.">Send Mail</a>
</body>
This does not work well. I do not get the subject in the email but I get what was entered in the comment field in the text of the email. Notice the method is get
<body>
<form enctype="text/plain" method="get" action="mailto:someone@mail.ca?subject=banana">
Comments: <textarea rows="5" cols="30" name="body"></textarea>
<input type="submit" value="Send">
</form></body>
This does not work well. I do not get the body in the email but I do get the subject. Notice the method is post
<body>
<form enctype="text/plain" method="post" action="mailto:someone@mail.ca?subject=banana">
Comments: <textarea rows="5" cols="30" name="body"></textarea>
<input type="submit" value="Send">
</form></body>
When I test with IE 7, XP, and Outlook 2007 all three work. The difference between the get and post is that when I use post the email goes out without me seeing it (the preferred method for my purposes). When I use get the email opens on my screen and I can modify the text. Since the email is sending the results of a test I would prefer that it went out without a chance of the user changing it.
I am unable to vary the two setups to determine which component is causing the issue but I am betting on IE 9 since the mailto: link works.
If all I needed to do was have the email sent with static content. I would just use the mailto link. However, the form I need to send is filled by JavaScript invoked by a button in a Flash document. The body and subject are supplied in the JavaScript. I am so out of practice with coding that I doubt I could create the link and click it programatically without wasting a lot of time. So, I would appreciate if someone could point out that there is something wrong with my form and make this issue go away. ;-)
-
Thursday, October 18, 2012 6:49 PM
I found another mention of the IE 9 problem here.
When I went to the w3shools site at
http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_form_mail
the mailto form worked as expected in IE7.
When I tried the same site in IE9 the email came up but had no content.
When I added a subject, to the action field I got the subject line.
When I changed the method to get, I got email up with no subject and no content.
When I changed the name of the input to body I got no subject and the content of the body input field.
I do not think this is a security issue since as I noted above a mailto: link without a form works just fine. There is a bug here somewhere.
-
Thursday, October 18, 2012 11:53 PM
I would appreciate if someone could point out that there is something wrong with my form and make this issue go away. ;-)
I wonder if IE9 has just fixed something that used to work unintentionally? E.g. what do you make of the examples in this (old) KB article?
http://support.microsoft.com/kb/279460
(Microsoft Search for
mailto subject site:support.microsoft.com
)
<quotes>
FORM elements cannot be used to fill in the various fields like Subject, Body, and and so forth because the mailto: protocol handler does not examine these fields.<FORM Action="mailto:xyz?Subject=Test_Post" METHOD="POST">
mailto: protocol test:
<Br>Subject:
<INPUT name="Subject" value="Test Subject">in the preceding case, this is how the data looks:
Subject=Test+Subject&Body=%09kfdskfdksfkds%0D%0A%09
</quotes>
I can't say I completely understand what all they may be trying to imply by the examples. It's almost like they are contradicting the first statement? I guess I would have to actually try them as given and then try modifying them to try to achieve something else and infer the actual implementation.
In any case, notice that both examples end with
<INPUT type="submit" value="Submit">
which is a different value than yours? Perhaps that would make yours go faster? ; )
Good luck
Robert
--- -
Friday, October 19, 2012 1:35 AM
When I went to the w3shools site
This worked for me into WLMail.
<form action="mailto:p1?subject=p2&body=p3" method="post" enctype="text/plain">
I can't get the input fields to be accepted by this template though. E.g. WLMail just displays the 3 parameters.
So that's more confirmation of the first sentence I quoted from KB279460. Are they implying that the mailto URL has to be built dynamically somehow? Then what is the point of the example? ; /
-
Friday, October 19, 2012 8:14 PM
Thanks.
I would appreciate knowing if you could get something more than "p3" into your body. I was having issues with the length of text I needed. I was not sure if I needed to escape the spaces or if it just failed after 50 characters or not.
I do not think there is an difference between
<INPUT type="submit" value="Submit">
and what I used. The value is the writing on the button as far as I remember. I have not use HTML that much this century and my skills are fading. ;-)
-
Saturday, October 20, 2012 3:34 AM
I would appreciate knowing if you could get something more than "p3" into your body.
I didn't try. What I have been doing is looking at ProcMon for the two enctype= cases trying to figure out if anything at all is being done with the form data. In the case of the default, e.g. when enctype= was deleted I saw an ATTxxxx file being created and deleted which WLMail never saw. So, I suspect that security/obscurity is at work. Another test I could try is making Outlook the default mailto handler and see if it fares any better.
Another possibility, I think, but outside of my experience, would be what I alluded to about the mailto URL being "built dynamically". E.g. I suspect that might be accomplished by scripting and changes to the DOM? Anyway, FWIW that's the tack I would take if trying to research such a possibility. Then that would make the mailto: URL work the way it evidently does but still allow you to use form inputs to derive its parameters.
I was not sure if I needed to escape the spaces or if it just failed after 50 characters or not.
I think all of the descriptions I have found are implying that the restrictions will be the same as a URL, which would provide for a length of more than 2,000 bytes. Try using the default enctype= which sounds like it would be more aware of such characteristics than plain text to see if that gets you any further?
I do not think there is an difference between
<INPUT type="submit" value="Submit">
and what I used. The value is the writing on the button as far as I remember.
I agree. I was thinking that it might be a CGI variable name like the others would be (if the post or get was working) but now I think the more important aspect will be the type="submit" that will just cause the mailto handler to be invoked--no CGI stuff at all.
BTW are you sure that this is the way you want to do your E-mail? See this post by Cheryl Wise which I found in one of my searches
Good luckRobert
---- Edited by Robert Aldwinckle on forumsMVP Saturday, October 20, 2012 3:37 AM Typo
-
Monday, October 22, 2012 1:13 PM
Thanks.
We are a government shop which requires that all the users have the same browser and email client so I did not have to deal with a variety of configurations.
Now, IT is upgrading to Windows 7 and Outlook 2010 across the country. So, I will have a mixture until that is over.
If I had complete control over the process I would look into building the URL dynamically. Unfotunately, there is too much out of my control. The mailto: form is being built by Adobe Captivate. It is invoked by clicking a button in Flash. I need to publish the course and then modify the code from Adobe each time I publish. ( I could probably modify some Adobe template and make sure everyone who publishes uses the update template.) Then I would need to brush up on my JavaScript skills. I have not used them for other than an odd debug session for that last 5 years.
This was a temporary fix until I got our LMS working. So, I will get the people who use IE to take a screen shot and email it in. I have too much to do to get the LMS working and tested to continue on a fix that will be used for so short a time. Too much work not enough time. ;-)
Well, thanks for your imput but I give up the pursuit.
- Proposed As Answer by Robert Aldwinckle on forumsMVP Monday, October 22, 2012 2:25 PM
-
Monday, October 22, 2012 3:23 PM
This was a temporary fix until I got our LMS working.
"LMS" = "Learning Management System"?
The mailto: form is being built by Adobe Captivate.
http://blogs.adobe.com/captivate/2009/07/sending_e-mail_on_completion_o.html
(via BING search for
LMS "management system" mailto adobe
)I think that probably could be the basis of what I was imagining as a "DOM solution". I may have a go at trying to use it at the TryIt page. Looks like it could plug in there fairly straightforwardly, e.g. as a onclick for the Submit (or something like that)? ; )
BTW thanks for these extra details. Perhaps we can find a usable workaround for you yet.
My ProcMon investigation has revealed a probable bug in mailto processing but I didn't see any functional difference using IE8 on XPsp3 VM so I doubt it is something new just in IE9. Specifically using ProcMon with IE9 I am seeing an inexplicable check for the existence of a file using the parameters of the mailto open action? Of course that would fail which I suspect could then result in a failure of any extra processing of the following data to add to the mailto's body= parameter (or create an attachment). I may try backing out to IE7 in my VM to see if that exposes the original implementation, e.g. a more precise clue about what would be broken in the new one. But even if this did identify a bug I think the method of dynamically creating the mailto URL would be a better way to go and provide a more timely solution for your problem.
FYIRobert
--- -
Monday, October 22, 2012 11:37 PM
I think that probably could be the basis of what I was imagining as a "DOM solution".
I couldn't get that working but in retrospect I think I still don't understand variables well enough to assume that I have given it a complete try.
Instead I made a modification of Rob's suggestion:
<!DOCTYPE html> <html> <head> <script> function sendMail(astrEmailTo,astrEmailSubject,astrEmailBody) { window.location = "mailto:"+astrEmailTo.value+"?subject="+astrEmailSubject.value+"&body="+astrEmailBody.value; } </script> </head> <body> <p>This example shows how to send an e-mail from a form:</p> <form> Name:<br> <input type="text" name="gstrEmailTo" size="20" onchange="gstrEmailTo=event.currentTarget.value;"><br> Subject:<br> <input type="text" name="gstrEmailSubject" size="20" onchange="gstrEmailSubject=event.currentTarget.value;"><br> Comment:<br> <input type="text" name="gstrEmailBody" size="40" onchange="gstrEmailBody=event.currentTarget.value;"> <br><br> <input type="submit" value="sendMail()" onclick=sendMail(gstrEmailTo,gstrEmailSubject,gstrEmailBody)> <input type="reset" value="Reset"> </form> </body> </html>This doesn't seem to be limited by size in any field. However, one odd thing I found while testing is that you can not have a question mark in the To: field? If you do, your Subject will disappear! ; }
FYIRobert
---


