Problem with long mailto: - urls

J

Jan - LundK

Hi,

I have a strange problem with my ASP.NET page. We have a function that
creates a mailto: link based on e-mails you can select. This can be many
e-mails, so the link can get very long. It works fine when protected mode in
IE is on, but when I turn it off, the browser just opens a blank page. This
happens when the length of my mailto: link gets over 508 characters. I
googled (and binged!) for this and found out that 508 characters is a
restriction for bookmarklets. So I guess the same restrictions apply to my
mailto: link.

Does anybody have an idea how to work around this behaviour? I read
something about client-side scripting, but I am not sure how to implement it
or if there is a better way.

You can reproduce the behavior without using ASP.NET, just create a blank
html page and insert a mailto: link with more than 508 characters. You have
to put it on an IIS server, opening the page from file system does not work
anyway.

Even if this is not really ASP.NET related, I posted it here because I need
a solution that works with ASP.NET.

Bye and thanks,

jan
 
G

Guest

Hi,

I have a strange problem with my ASP.NET page. We have a function that
creates a mailto: link based on e-mails you can select. This can be many
e-mails, so the link can get very long. It works fine when protected mode in
IE is on, but when I turn it off, the browser just opens a blank page. This
happens when the length of my mailto: link gets over 508 characters. I
googled (and binged!) for this and found out that 508 characters is a
restriction for bookmarklets. So I guess the same restrictions apply to my
mailto: link.

Does anybody have an idea how to work around this behaviour? I read
something about client-side scripting, but I am not sure how to implement it
or if there is a better way.

You can reproduce the behavior without using ASP.NET, just create a blank
html page and insert a mailto: link with more than 508 characters. You have
to put it on an IIS server, opening the page from file system does not work
anyway.

Even if this is not really ASP.NET related, I posted it here because I need
a solution that works with ASP.NET.

Bye and thanks,

jan

Hi jan,

I think it's a problem of your email client. I have no problem to
click on mailto link with more than 508 characters (I'm using
Outlook).

Do you really need to have in that way? Maybe you can generate the
email and send it from the application.

Also, please, look at the following post, maybe this can help
http://www.aspsnippets.com/Articles/Different-ways-to-create-mailto-link---ASP.Net.aspx
 
J

Jan - LundK

Anon User said:
Hi jan,

I think it's a problem of your email client. I have no problem to
click on mailto link with more than 508 characters (I'm using
Outlook).

Do you really need to have in that way? Maybe you can generate the
email and send it from the application.

Also, please, look at the following post, maybe this can help
http://www.aspsnippets.com/Articles/Different-ways-to-create-mailto-link---ASP.Net.aspx
.

Hi Alexey,

sorry for the late answer. We are using MS Outlook 2007. The problem can be
reproduced on our clients which run IE8 under Windows 7 Enterprise 64-bit.

Did you try it to turn off protected mode in IE?

Bye and thanks
jan
 
G

Guest

Hi Alexey,

sorry for the late answer. We are using MS Outlook 2007. The problem can be
reproduced on our clients which run IE8 under Windows 7 Enterprise 64-bit..

Did you try it to turn off protected mode in IE?

Bye and thanks
jan

Hm. no I didn't try it.

What happens if you do it e.g. via javascript?

<script type="text/javascript">
function emailMe(){
var email = "(e-mail address removed);[email protected];";
var mailto_link = 'mailto:'+email;
win = window.open(mailto_link,'emailWindow');
if (win && win.open &&!win.closed) win.close();
}
</script>
<a href="#" onclick="emailMe();">Open Email</a>

And what about other browsers?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Crypto wallet recovery long shot 4
Need an if statement 8
Relative URLs 6
using MAILTO from a web page 2
Help with datascraping script 1
Mailto in Code behind 2
Problem with code 6
Problem with KMKfw libraries 1

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top