Problem with long mailto: - urls

  • Thread starter Thread starter Jan - LundK
  • Start date Start date
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
 
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 modein
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 implementit
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
 
Alexey Smirnov 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
 
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?
 
Back
Top