?
Solved

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

Posted on 2013-02-04
1
Medium Priority
?
552 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
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…
Suggested Courses

864 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