Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Process.Start - Is there a MailTo Length Limitation?

Posted on 2008-11-07
6
Medium Priority
?
1,168 Views
Last Modified: 2012-05-05
I have a DataGridView filled with contacts and want the ability for a user to select groups of users and send an email. I accomplished this with a call to Process.Start with a mailto: string passed in as an argument. This works for small groups, but seems to have a size limitation around 2000 characters. Can anyone confirm this? Is there a better technique for allowing distribution lists like this from .NET?
0
Comment
Question by:ufpcit
  • 2
  • 2
  • 2
6 Comments
 
LVL 8

Expert Comment

by:tiagosalgado
ID: 22909355
But you're using .NET classes to send email or just adding all contacts to outlook message form?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 22912645
if your distribution list exist in your exchange server, you can use System.Net.Mail. have a look at http://www.emoreau.com/Entries/Articles/2007/09/Using-SystemNetMail.aspx
0
 

Author Comment

by:ufpcit
ID: 22914286
My distribution lists do not exist in Exchange. It's basically a contact table that spans departments and I want the ability to select a group of records in the grid, right click and send them mail. I'm using the Process.Start function and sending a string that is the "mailto:Joe.Smith@co.com;Jane.Smith@co.com", which works except that either the Process.Start or the Mailto syntax are hitting a maximum length. The error message I get, simply indicates "Access Denied".
0
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.

 
LVL 8

Expert Comment

by:tiagosalgado
ID: 22914588
Using mailto (causing a new outlook mail message) you're limited to 50 emails (i think is that the limit).
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 1500 total points
ID: 22916288
from http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/6ff1d31e-04ba-4080-8c49-389abfe4e430/

"You're executing a URL when you try to Start mailto:...  URLs have a 2083 character limit in Internet Explorer, you're probably causing Internet Explorer grief because you've passed too much data."
0
 

Author Closing Comment

by:ufpcit
ID: 31514558
The 2083 limit makes sense. Thanks Emoreau. I changed the technique to use the Outlook 11 library to bypass this limitation. Works great now!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Integration Management Part 2
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

572 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