CDONTS string length limit

Results 1 to 4 of 4

Thread: CDONTS string length limit

  1. #1
    Frank Hartmann Guest

    Default CDONTS string length limit

    I have several ASP scripts that use CDONTS for sending email. For a long time they have worked flawlessly. I have discovered, however, a disturbing limit in the Body property of the object. <BR><BR>Specifically, I have portions of the Body property (the body of the email message) which are strings of more than 74 consecutive characters unbroken by white space or carriage returns. In my case these strings are URLs but after testing I have determined that ANY unbroken string in excess of 74 characters will have a carriage return inserted and the string will be broken.<BR><BR>As an example, the string "" is 75 characters long. If sent as part of the body of a CDONTS email message, the string has a carriage return inserted by the CDONTS object between the &#039m&#039 and the &#039l&#039 of the .html extension. This leaves the URL looking like this to the email recipient:<BR><BR><BR>l<BR><BR>Any ideas on how to get around this limitation of the CDONTS object? Right now I&#039ll probably have my ASP scripts call my Perl scripts with the email info and let the Linux SMTP mailer do the mailing for me. But I am interested if anyone else has seen this CDONTS behavior before.<BR><BR>Regards,<BR><BR>Frank Hartmann<BR><BR><BR>

  2. #2
    Fr0st Guest

    Default RE: CDONTS string length limit

    Hello,<BR><BR>Not to discourage you, but I have never found a size limitation for strings within CDONTS. I generally send out HTML emails w/ CDONTS where the Body is generated with VBScript. The BODY variable that I use has a string that is at least 100 to 200 characters long. <BR><BR>What you might want to try is setting your BodyFormat property to 0 (HTMLemail); maybe this will alleviate your problem. <BR><BR>Fr0st

  3. #3
    Frank Hartmann Guest

    Default RE: CDONTS string length limit

    Thanks for your response.<BR><BR>Actually, the problem isn&#039t the length of the string as a whole, but rather the length of a series of characters uninterrupted by whitespace or carriage returns. As in my example, URLs in excess of 74 characters.

  4. #4
    Joerg Schrickel Guest

    Default RE: CDONTS string length limit

    Hi Frank, I had the same problem and got an answer from another nice guy. Read this, hope this solves your problem!!<BR><BR>Ah, the intricacies of CDONTS.<BR><BR>Yes, I do know the answer to your problem.<BR><BR>When sending a plain text message using CDONTS, your line length is limited<BR>to 74 characters. If the line length is more than 74 characters, the line<BR>will be broken down into several lines. This happens when setting the text<BR>property of a CDONTS NewMail object.<BR><BR>You can work around this problem by setting the MailFormat and BodyFormat<BR>properties of the CDONTS object, or the MessageFormat property of the<BR>Message object to send MIME formatted mail. The default setting for these<BR>properties is to send plain text.<BR><BR>simply set YourObject.BodyFormat=1 and YourObject.MailFormat=0 .<BR><BR>An example is below.<BR><BR>This should work just fine, let me know if the problem persists.<BR><BR>Set myMail = CreateObject("CDONTS.NewMail")<BR><BR> &#039Remarking out the following 2 lines causes plain text to be sent.<BR> myMail.BodyFormat=1<BR> myMail.MailFormat=0<BR><BR> myMail.From=""<BR> myMail.To=""<BR> myMail.Subject="CDONTS String Length Test"<BR> myMail.Body= "Insert message text here"<BR> myMail.Send<BR> Set mymail=Nothing<BR><BR><BR>Thanks,<BR>Hunter<BR><BR >

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts