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
Solved

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

Posted on 2013-02-04
1
517 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 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
document.write() deleting all existing HTML 5 51
HTML5 Looping table certain Cell 11 55
Multiflying 2 Input Text On a Table 7 31
Review of the nodejs code 1 16
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

828 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