CDONTS : Problem will linking to the url sent thro

Results 1 to 4 of 4

Thread: CDONTS : Problem will linking to the url sent thro

  1. #1
    Pankaj B Guest

    Default CDONTS : Problem will linking to the url sent thro

    I have a tipical problem. I am generating mails through CDONTS with the following code:<BR> Set objNewMail = Server.CreateObject("CDONTS.NewMail") <BR> objNewMail.From = ""<BR> objNewMail.To = "" <BR> objNewMail.Subject = "Test Result"<BR> objNewMail.Body = "" <BR> objNewMail.Send <BR> Set objNewMail = Nothing <BR><BR>Basically i am trying to pass a url in the mail body. The message gets dilivered but the url is not getting displayed properly. It <BR>shows the complete path of the url but the last 12 characters are wrapped to the next line and it doesnot show the last 12 character as a part of hyperlink, which it should. The outcome is as follows :<BR>"<BR>000000000015"<BR><BR>Hence i am not able to read the right value of the querystring variable "Examination_Key" when linked to the url. I am getting 00000000 instead of 00000000000000000015.<BR><BR>I have tried UrlEncode and HtmlEncode unsuccessfully. I tried to send the value with &#039 &#039 also but it was of no use.<BR><BR>Please suggest as early as possible.<BR><BR>

  2. #2
    Pallermas Guest

    Default RE: CDONTS : Problem will linking to the url sent

    Just a tought<BR>objNewMail.Body = "" _ & "Key=00000000000000000015"<BR>it would be like 2 seperate strings forced togheter.<BR>i&#039m pretty sure it wouldn&#039t but we never know.<BR>as i can&#039t come up with something better. ;)

  3. #3
    Join Date
    Dec 1969

    Default RE: CDONTS : Problem will linking to the url sent

    I had the same problem. I solved it by sending the message in both HTML form and MIME. It took me a while to figure out that when you send your mail in HTML format you also have to set it to be sent in MIME format.<BR><BR>Your body should be something like<BR>strBody = "&#060;html&#062;&#060;body&#062;&#060;a href=""""&#062;;/a&#062;"<BR><BR>Dim objCDOMail &#039The CDO object variable<BR> strTo = &#039email address<BR> <BR> Set objCDOMail = CreateObject("CDONTS.NewMail") &#039creating CDO object<BR> &#039 Set the properties of the object<BR> objCDOMail.From = strFrom<BR> objCDOMail.To = strTo<BR> &#039objCDOMail.CC = strCC<BR> objCDOMail.MailFormat = cdoMailFormatMIME<BR> objCDOMail.BodyFormat = cdoBodyFormatHTML &#039 1 = HTML; 0 = Text<BR> objCDOMail.Subject = strSubject<BR> objCDOMail.Body = strBody<BR> &#039 Send the message!<BR> objCDOMail.Send<BR> &#039 Set the object to nothing because it immediately becomes<BR> &#039 invalid after calling the Send method.<BR> Set objCDOMail = Nothing

  4. #4
    Joerg Schrickel Guest

    Default RE: CDONTS : Problem will linking to the url sent

    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>

Posting Permissions

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