Professional Web Applications Themes

CDONTS-Sending HTML mail-8000 character limit - Microsoft SQL / MS SQL Server

Hi all, I have seen a few messages about this in the archives, but none provide a comprehensive answer. Basically, I want to use CDONTS mail support from within SQL server to send HTML formatted email that could potentially be longer than 8000 characters. (I have done it successfully with short HTML mails). Is there any way to do this? If not, could anyone offer alternative suggestions for implementing a mailing list to email addresses stored in an SQL Server 2000 database table? Thanks, in advance, Shane....

  1. #1

    Default CDONTS-Sending HTML mail-8000 character limit

    Hi all,

    I have seen a few messages about this in the archives, but none
    provide a comprehensive answer.

    Basically, I want to use CDONTS mail support from within SQL server to
    send HTML formatted email that could potentially be longer than 8000
    characters. (I have done it successfully with short HTML mails).

    Is there any way to do this? If not, could anyone offer alternative
    suggestions for implementing a mailing list to email addresses stored
    in an SQL Server 2000 database table?

    Thanks, in advance,
    Shane.
    Shane Porter Guest

  2. #2

    Default Re: CDONTS-Sending HTML mail-8000 character limit

    Shane,

    In SQL 7.0, I created a sp that receives as parameters the body of the email
    as a text parameter. Then, when setting the 'body' property of the
    CDONST.NewMail object, I use this parameter. It works just fine. Like this:

    CREATE PROCEDURE sp_SysEnviaEmail
    remetente text,
    destinatario text,
    assunto text,
    corpo text
    ......
    EXEC hr = sp_OACreate 'CDONTS.NewMail', object OUT
    EXEC hr = sp_OASetProperty object, 'From', remetente
    EXEC hr = sp_OASetProperty object, 'To', destinatario
    EXEC hr = sp_OASetProperty object, 'Subject', assunto
    EXEC hr = sp_OASetProperty object, 'Body', corpo


    --
    ---------------------------------------------
    Charlie Yukio Nakagawa
    Direct Talk - 3049-8421
    ---------------------------------------------

    "Shane Porter" <shaneporter66hotmail.com> escreveu na mensagem
    news:b8b802e8.0307030549.105a20e7posting.google.c om...
    > Hi all,
    >
    > I have seen a few messages about this in the archives, but none
    > provide a comprehensive answer.
    >
    > Basically, I want to use CDONTS mail support from within SQL server to
    > send HTML formatted email that could potentially be longer than 8000
    > characters. (I have done it successfully with short HTML mails).
    >
    > Is there any way to do this? If not, could anyone offer alternative
    > suggestions for implementing a mailing list to email addresses stored
    > in an SQL Server 2000 database table?
    >
    > Thanks, in advance,
    > Shane.

    Charlie Yukio Nakagawa Guest

  3. #3

    Default Re: CDONTS-Sending HTML mail-8000 character limit

    Hi Charlie,

    thanks for the feedback, but I have a stored procedure like the one
    you have posted. If I change the 'corpo'/body parameter data type to
    text, the longest string I can send is 4000 characters.

    <I need to be able to send _over_ 8000 characters>

    Shane.

    "Charlie Yukio Nakagawa" <charlie.nakagawauol.com.br> wrote in message news:<exu5M$ZQDHA.2480tk2msftngp13.phx.gbl>...
    > Shane,
    >
    > In SQL 7.0, I created a sp that receives as parameters the body of the email
    > as a text parameter. Then, when setting the 'body' property of the
    > CDONST.NewMail object, I use this parameter. It works just fine. Like this:
    >
    > CREATE PROCEDURE sp_SysEnviaEmail
    > remetente text,
    > destinatario text,
    > assunto text,
    > corpo text
    > .....
    > EXEC hr = sp_OACreate 'CDONTS.NewMail', object OUT
    > EXEC hr = sp_OASetProperty object, 'From', remetente
    > EXEC hr = sp_OASetProperty object, 'To', destinatario
    > EXEC hr = sp_OASetProperty object, 'Subject', assunto
    > EXEC hr = sp_OASetProperty object, 'Body', corpo
    >
    >
    > --
    > ---------------------------------------------
    > Charlie Yukio Nakagawa
    > Direct Talk - 3049-8421
    > ---------------------------------------------
    >
    > "Shane Porter" <shaneporter66hotmail.com> escreveu na mensagem
    > news:b8b802e8.0307030549.105a20e7posting.google.c om...
    > > Hi all,
    > >
    > > I have seen a few messages about this in the archives, but none
    > > provide a comprehensive answer.
    > >
    > > Basically, I want to use CDONTS mail support from within SQL server to
    > > send HTML formatted email that could potentially be longer than 8000
    > > characters. (I have done it successfully with short HTML mails).
    > >
    > > Is there any way to do this? If not, could anyone offer alternative
    > > suggestions for implementing a mailing list to email addresses stored
    > > in an SQL Server 2000 database table?
    > >
    > > Thanks, in advance,
    > > Shane.
    Shane Porter Guest

  4. #4

    Default Re: CDONTS-Sending HTML mail-8000 character limit

    Although not CDONTS [url]http://sqldev.net/xp/xpsmtp.htm[/url] has a messagefile
    parameter that contains the message text in PlaintText or HTML with a max
    file size of 64 KB

    Jose

    "Shane Porter" <shaneporter66hotmail.com> wrote in message
    news:b8b802e8.0307030549.105a20e7posting.google.c om...
    > Hi all,
    >
    > I have seen a few messages about this in the archives, but none
    > provide a comprehensive answer.
    >
    > Basically, I want to use CDONTS mail support from within SQL server to
    > send HTML formatted email that could potentially be longer than 8000
    > characters. (I have done it successfully with short HTML mails).
    >
    > Is there any way to do this? If not, could anyone offer alternative
    > suggestions for implementing a mailing list to email addresses stored
    > in an SQL Server 2000 database table?
    >
    > Thanks, in advance,
    > Shane.

    Jose Hernandez Guest

Similar Threads

  1. Sending Attachement using APS Cdonts
    By Sandeep P in forum ASP Components
    Replies: 1
    Last Post: October 29th, 09:26 PM
  2. [PHP] Problem sending HTML formated mail
    By David T-G in forum PHP Development
    Replies: 2
    Last Post: September 18th, 07:22 PM
  3. Problem sending HTML formated mail
    By SLanger@spirit21.de in forum PHP Development
    Replies: 0
    Last Post: September 17th, 06:48 AM
  4. Sending HTML formatted mail using CDONTS
    By Paul Turley in forum ASP.NET General
    Replies: 2
    Last Post: August 12th, 09:16 AM
  5. Sending message to SMTP server using CDONTS component
    By Chris Pearson in forum ASP.NET General
    Replies: 2
    Last Post: July 28th, 12:06 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139