Solved

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

Posted on 2013-02-04
1
520 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 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
alert on input text 2 25
Adding 1 the value of input "text" every 3 seconds 5 33
converting document.write() to innerHTML 7 50
null, truthy, falsey confusion 25 33
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
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…

726 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