Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Is there anyway to increase the size limit on a "mailto" function

Posted on 2013-02-04
1
Medium Priority
?
546 Views
Last Modified: 2013-02-05
Hi,

I have a list of contacts with emails, I want the user to be able to select the contacts they want to email and click a button to open up Outlook and populate bcc.

This is ok unless they select a lot of email addresses and the URL is too long, is there a way to get around this?

function SendEmails()
			{
				var blVals = false;
				var emailto = '';
								
				for (n = 0; n < document.frmSendMail.elements.length; n++)
					{
						if (document.frmSendMail.elements[n].name.substring(0,5) == 'Mail_')
							{
								if (document.frmSendMail.elements[n].checked)
									{
										var fieldname = 'EmailTo' + document.frmSendMail.elements[n].name.substring(document.frmSendMail.elements[n].name.indexOf('_'));
										
										var emailto = emailto + ';' + document.getElementById(fieldname).value;
										
																	
										blVals = true;										
										
									}
							}
					}
					
				if (blVals == false)
					{
						alert('Please select performers to email...');
						return false;
					}
				else
					{
						location.replace('mailto:&bcc=' + emailto);
					}
			}
			

Open in new window

0
Comment
Question by:Tra71
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
Robby Swartenbroekx earned 2000 total points
ID: 38851469
Depending on the browser you are using.
IE for example supports URL's up to 2083 characters.
maybe do a check, if your emailto field goes over the 2000 characters, start a new mail message.
I tought outlook also had a maximum of 50 recipients for each message.

50 recipients is mostly not 2000 characters, I think it's even better to make a message every 50 users, or maximize the amount of selectable adresses to 50.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question