MozillaZine

mialto body text character limit

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
larrysbird
 
Posts: 4
Joined: August 7th, 2007, 3:01 pm

Post Posted August 7th, 2007, 4:11 pm

Hi guys,

Is there any limit on the number characters that a mailto body text will have? I tried this javascript snippet below and

...

var text= "blahblah";
window.location= "mailto:diko@mysite.com?body="+text
...

It seems when my text is a bit too long say 2k characters, my mail client(i.e. MS Outlook) won't pop-up anymore. But i tried shortening of my text to see if it works, it works fine. When I use IE no problem, but my firefox won't. Is there any way i could resolve this on firefox?

Thanks in advance for you help.

Regards,

larrysbird
 
Posts: 4
Joined: August 7th, 2007, 3:01 pm

Post Posted August 13th, 2007, 1:44 pm

sorry but has anyone have any idea or thought

thanks

jscher2000

User avatar
 
Posts: 10756
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted August 13th, 2007, 2:16 pm

Both Fx and IE use the OS (URL:mailto setting in the registry) for this. Based on your test, it sounds as though there is a smaller limit on the length of parameters Firefox will send to the OS. Not sure why. Do you really need such a long message?

Jimbob0i0
 
Posts: 422
Joined: May 4th, 2005, 1:19 am

Post Posted August 14th, 2007, 10:33 am

Mailto: is unreliable at best anyway as there is no standard adhered to on how to handle it. What are you trying to accomplish? Maybe a mailer form in php or cgi would be preferable?

larrysbird
 
Posts: 4
Joined: August 7th, 2007, 3:01 pm

Post Posted August 14th, 2007, 2:41 pm

Hi guys,

Thanks for the replies ( i thought i couldn't get some clue here ;) ), i was told to do it this way since theres a department here in my company that will use this feature in their application. The thing is only few people are going to use this feature. Thats why they decided to have the MS outlook to be the default email client to pop up everytime a particular button is pressed. Why I'm asking for the character limit is because there's a default "Text" that I need to put in the body everytime the email client(ms outlook) pops up so they they don't have to write this message over and over again and also the can add/edit on it when they want to.

btw, the default body "text" message is i guess its about almost 2k characters on it.

Hope you got my point. I'm still looking for alternatives if there are any ( im thinking using php but not using email client anymore :( ).

Thanks guys for you help.

regards,

also try the script below and you'll know what i mean.

[script]

var body="I was just visiting your website ..... // make these more than 1,600 characters
window.location = "mailto:yourmail@yoursite.com?body="+body;

[/script]

Jimbob0i0
 
Posts: 422
Joined: May 4th, 2005, 1:19 am

Post Posted August 15th, 2007, 12:11 am

There have always been issues with mailto in a variety of browsers simply because it has no standardised behaviour. What you see today in any browser could change tomorrow. I would say use it maybe for the to and subject fields and only on a non public site. Anything more than that use a server side script. I can post my php mailer code if you like as an example. If you have an email addy on a public site it will get harvested for spam use so you might want to bear that in mind in future.

larrysbird
 
Posts: 4
Joined: August 7th, 2007, 3:01 pm

Post Posted August 16th, 2007, 10:13 am

Jimbob0i0 wrote:There have always been issues with mailto in a variety of browsers simply because it has no standardised behaviour. What you see today in any browser could change tomorrow. I would say use it maybe for the to and subject fields and only on a non public site. Anything more than that use a server side script. I can post my php mailer code if you like as an example. If you have an email addy on a public site it will get harvested for spam use so you might want to bear that in mind in future.
yep thanks man i agree. anyways thanks for the tip. and btw the feature is not applied to a public site.

And I appreciate much if i can see your php mailer code :)


thanks again

Jimbob0i0
 
Posts: 422
Joined: May 4th, 2005, 1:19 am

Post Posted August 16th, 2007, 2:33 pm

On my blackberry now but will post the mailer code for you tomorrow.

In general I avoid email addys even on internal pages if the app has any potential of being used outside such as you I came accepas your site etc example (never know what management will ask after all)

Return to Web Development / Standards Evangelism


Who is online

Users browsing this forum: No registered users and 5 guests