Another method is just to use the standard constants as Chris outlined in a post on my site. Also some info here [url]http://www.charon.co.uk/content.aspx?CategoryID=27&ArticleID=26[/url] -- Jules [url]http://www.charon.co.uk/charoncart[/url] Charon Cart 3 Shopping Cart Extension for Dreamweaver MX/MX 2004 [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Julian Roberts [ip] => newsg@charon.co [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 5 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> Problem with CDOSYS - Dreamweaver AppDev

Problem with CDOSYS - Dreamweaver AppDev

I am having problems when running the following code, I have tried getting support from my ISP but they haven't a clue... 'Creation of the Email Server Object Set objMessage = CreateObject("CDO.Message") Set objConfig = CreateObject("CDO.Configuration") 'Here is determined which way emails will be processed (local oder external 'server). Please always set an external server. objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort 'Outgoing SMTP server with SMTP authentication objConfig.Fields(cdoSMTPServer) = "post.newnet.co.uk" 'SMTP port objConfig.Fields(cdoSMTPServerPort) = 25 'Plain text authentication objConfig.Fields(cdoSMTPAuthenticate) = cdoBasic 'account name objConfig.Fields(cdoSendUserName) = "" 'password objConfig.Fields(cdoSendPassword) = "" objConfig.Fields.Update Set objMessage.Configuration = objConfig objMessage.To = "somebodysomedomain.com" objMessage.From = "somebodysomeotherdomain.com" objMessage.Subject = ...

  1. #1

    Default Problem with CDOSYS

    I am having problems when running the following code, I have tried getting
    support from my ISP but they haven't a clue...

    'Creation of the Email Server Object
    Set objMessage = CreateObject("CDO.Message")
    Set objConfig = CreateObject("CDO.Configuration")

    'Here is determined which way emails will be processed (local oder external
    'server). Please always set an external server.

    objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort

    'Outgoing SMTP server with SMTP authentication
    objConfig.Fields(cdoSMTPServer) = "post.newnet.co.uk"

    'SMTP port
    objConfig.Fields(cdoSMTPServerPort) = 25
    'Plain text authentication
    objConfig.Fields(cdoSMTPAuthenticate) = cdoBasic

    'account name
    objConfig.Fields(cdoSendUserName) = ""

    'password
    objConfig.Fields(cdoSendPassword) = ""

    objConfig.Fields.Update

    Set objMessage.Configuration = objConfig
    objMessage.To = "somebodysomedomain.com"
    objMessage.From = "somebodysomeotherdomain.com"
    objMessage.Subject = "this is my subject"
    objMessage.HTMLBody = "this is my message"

    On Error Resume Next
    objMessage.Send


    It is falling over on the line objConfig.Fields(cdoSendUsingMethod) =
    cdoSendUsingPort
    I am getting the following error -



    Any ideas, suggestions or tutorials would be appreciated.

    Many thanks in advance

    Rob





    The Ox Guest

  2. #2

    Default Re: Problem with CDOSYS

    Post went before I could finish...

    error is

    ADODB.Fields error '800a0bb9'
    Arguments are of the wrong type, are out of acceptable range, or are in
    conflict with one another.

    /test.asp, line 10

    Thanks


    The Ox Guest

  3. #3

    Default Re: Problem with CDOSYS

    The Ox wrote:
    > It is falling over on the line objConfig.Fields(cdoSendUsingMethod) =
    > cdoSendUsingPort
    Do you have cdoSendUsingMethod (and the other cdoXX variables)
    defined somewhere within your code, maybe in an include? If not, then
    that is the probelm, those variable do not contain the values that the
    objects being used expect. Take a look at the code from Microsoft for
    sending email with CDOSYS:
    [url]http://support.microsoft.com/?kbid=286431[/url]
    (don't look in Firefox or Mozilla as M$ somehow botched up the display
    for the <PRE> tag for those browsers)


    --
    Danilo Celic
    | Extending Knowledge, Daily [url]http://CommunityMX.com/[/url]
    danilocelic *TMM* Guest

  4. #4

    Default Re: Problem with CDOSYS

    You might try setting the config variables using the method I outlined in
    this forum posting:

    [url]http://www.charon.co.uk/aspnetforums/ShowPost.aspx?PostID=3074[/url]

    It's a little different from the method you're using, but I've used it
    successfully.

    Best regards,
    Chris


    Chris In Madison Guest

  5. #5

    Default Re: Problem with CDOSYS

    It's a coding error. ISP's normally shy away from those. You probably
    haven't included the meta data. eg

    <!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
    NAME="CDO for Windows 2000 Type Library" -->
    <!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4"
    NAME="ADODB Type Library" -->

    Another method is just to use the standard constants as Chris outlined in a
    post on my site. Also some info here

    [url]http://www.charon.co.uk/content.aspx?CategoryID=27&ArticleID=26[/url]

    --
    Jules
    [url]http://www.charon.co.uk/charoncart[/url]
    Charon Cart 3
    Shopping Cart Extension for Dreamweaver MX/MX 2004


    Julian Roberts Guest

Similar Threads

  1. CDOSYS vs CDONTS
    By in forum ASP Components
    Replies: 3
    Last Post: April 13th, 11:24 PM
  2. CDOSYS NNTP
    By Roland Hall in forum ASP Components
    Replies: 12
    Last Post: April 9th, 09:18 AM
  3. CDOSYS and smarthost
    By Dune in forum ASP Database
    Replies: 3
    Last Post: January 8th, 03:13 AM
  4. CDOSYS URL namespace... Huh?
    By Brian Smither in forum ASP Components
    Replies: 2
    Last Post: January 5th, 07:49 PM
  5. cdosys.dll problem
    By ram in forum ASP.NET Security
    Replies: 0
    Last Post: August 18th, 03:21 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
  •