locked
URL mailto component limited to 256 characters... How can I get around that? RRS feed

  • Question

  • User-669404581 posted

    Need some help...

    My site uses a very simple html script (see below) to generate group e-mails.  While we were a small Scout Troop, the script worked fine, however the string is limited to 256 characters so as we grew (and the e-mail list grew) we bumped up against the character limit and the script now fails.   Is there a  asp script, javascript, etc., or method I might employ to overcome this limit?

    PS  I'm as one my say, code challenged (i.e., not very literate) so I need something I can cut 'n paste into the page.

    <a href="mailto:
    name@google.com,
    name@msn.com,
    name@cox.net,
    name@earthlink.net,
    name@yahoo.com,
    name@verizon.com
    name@netzero.com,
    name@harvard.edu,
    etc.etc@aol.com
    "><b>All Scoutmasters</b>
    </a>

    Wednesday, November 12, 2008 2:52 AM

Answers

  • User-823196590 posted

    First off, this issue has nothing to do with IIS or ASP, it's a simple HTML problem.

    If this is the only way you can send the email then I'm afraid you're out of luck.  Are you actually using ASP?  If yes then I can show you a better way.  If not, I would suggest creating some group distibution, so you can send the email to one address and it gets sent to all.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, November 12, 2008 9:28 AM
  • User-823196590 posted

    See my response in your other post.

    If you've already reached the limit in the number of addresses the mailto can accomodate, then there's nothing you can do to get that to work with all of the required addresses.  You'll need a server side solution.

    The only alternative is to manage the group list yourself.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, November 12, 2008 11:25 AM

All replies

  • User-823196590 posted

    First off, this issue has nothing to do with IIS or ASP, it's a simple HTML problem.

    If this is the only way you can send the email then I'm afraid you're out of luck.  Are you actually using ASP?  If yes then I can show you a better way.  If not, I would suggest creating some group distibution, so you can send the email to one address and it gets sent to all.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, November 12, 2008 9:28 AM
  • User-669404581 posted

    Thanks tomkmvp.  Agreed.  It is an html problem.  The current html hyperlink is, however, in an asp password protected page.  If there is a better way, please show me!  I need a solution that permits the the user to click on a link that opens the users default e-mail system and populates the mailto address area.

    This is an odd group I work with.  I tried to use something like Google Groups but resistance mounted. 

    Wednesday, November 12, 2008 10:42 AM
  • User-823196590 posted

    See my response in your other post.

    If you've already reached the limit in the number of addresses the mailto can accomodate, then there's nothing you can do to get that to work with all of the required addresses.  You'll need a server side solution.

    The only alternative is to manage the group list yourself.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, November 12, 2008 11:25 AM
  • User-669404581 posted

    As always, tomkmvp, thanks.  Can you illustrate what you mean by server side solution or perhaps point me in the direction where I can find the data myself? 

    I've seen some writings on bulk e-mail but sadly I do not have the background to grasp the intricacies of the discussion boards.

    Wednesday, November 12, 2008 11:51 AM
  • User-823196590 posted

    You have it all right here: http://forums.iis.net/t/1151726.aspx

    Wednesday, November 12, 2008 3:17 PM
  • User-669404581 posted
    Thanks tomkmvp.  Can you put it all together for me?  What would the completed .asp script look like?  I'm looking for a solution that permits the user to click on a single tab that will then open their default e-mail system and populate the "To:" addressee area with e-mail addresses (user then completes the subject and body of the message).  I apologize for sounding ignorant (but I am).  I'm just not code literate or savvy enough to figure this out on my own.  Can you please show me how I would modify the html code below to accomplish that using ,asp?  Appreciate the help (and your patience)!

    <a href="mailto:
    name@google.com,
    name@msn.com,
    name@cox.net,
    name@earthlink.net,
    name@yahoo.com,
    name@verizon.com
    name@netzero.com,
    name@harvard.edu,
    etc.etc@aol.com
    "><b>All Scoutmasters</b>
    </a>

    Wednesday, November 12, 2008 3:49 PM
  • User-823196590 posted

    I'm looking for a solution that permits the user to click on a single tab that will then open their default e-mail system and populate the "To:" addressee area with e-mail addresses
    I don't think you're hearing me - it's not possible.  As you have found out, there are too many email addresses for this to work this way.  It will require a completely different method.
    Thursday, November 13, 2008 7:41 AM
  • User-669404581 posted

    Hear you loud and clear.  Can you suggest a method to try?

    Thursday, November 13, 2008 8:34 AM
  • User-823196590 posted

    Write ASP code like I showed you in http://forums.iis.net/t/1151726.aspx so it sends the email to all of your required addresses.

    Thursday, November 13, 2008 1:43 PM
  • User-669404581 posted
    Thanks tomkmvp.  The server side solution in that earlier code worked just fine (thanks again!), but I'm now looking for something just a little different, I think; a method that auto-populates the "To:" field within the users default message handling system but leaves both the "Subj:" and body of the message open to user input, i.e.,
     
    <a href="mailto: name@google.com, [etc., etc. ...]"><b>All Users</b></a>
    Is there a method to 'fool' the system into thinking the URL string is actually much less than the 256 characters that it really is?  I'm beginning to sense that is just not possible...  
    Thursday, November 13, 2008 2:28 PM
  • User-1419256127 posted
    There's an alternate way to get this work purely on the client side. This would involve an activeX component to invoke the mail. This can be activated through a javascript. Look at the following code that invokes the outlook compose box with many characters filled into "TO", "From", or any other field. One negative point with this approach is this works only with IE and should have activeX script enabled. /* Code snippet to open outlook compose box through Javascript .. You may call this on click and fill in whatever value as param to this function */ function OpenOutLookBox (strFrom, strTo, strCC, strBCC, strSubject, strBody) { /* Sample code by DrGiri */ // make sure that all the params "" atleast is passed into this function var constOutLookInBox = 6; // constant decalred within VB for outlook Inbox folder.. var objOutlook = new ActiveXObject("Outlook.Application"); var objMapiNameSpace = objOutlook.getNameSpace("MAPI"); var objMailFolder = objMapiNameSpace.getDefaultFolder(constOutLookInBox); var objMail = objMailFolder.Items.add('IPM.Note.FormA'); objMail.SentOnBehalfOfName = (null==strFrom?"":strFrom); objMail.To = (null==strTo?"":strTo); objMail.Cc = (null==strCC?"":strCC); objMail.Bcc = (null==strBCC?"":strBCC); objMail.Subject=(null==strSubject?"":strSubject); objMail.HTMLBody = (null==strBody?"":strBody) ; objMail.display (0); }
    Monday, February 23, 2009 6:16 AM
  • User-823196590 posted

    Great idea, however keep in mind that in the OP's case all users may not be on Windows or use Outlook.

    Monday, February 23, 2009 7:04 AM
  • User-669404581 posted

    Is there some way to invoke this or a similar command such that it opens a users default e-mail application and not just Internet Explorer and Outlook?

    Thanks!

    Thursday, March 5, 2009 10:23 PM
  • User-823196590 posted

    A mailto anchor tag (but then you hit that limit again).

    Friday, March 6, 2009 6:54 AM