CDOSYS and smarthost

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default CDOSYS and smarthost

    I'm trying to send an email from my ASP page using
    CDO.Message and CDO.Configuration. I couldn't get this to
    work for ages and all my emails ended up in
    inetpub\mailroot\queue.

    I'm behind a firewall and finally figured out that i have
    to set the smarthost field for the SMTP Virtual Server in
    IIS to get any emails to send. All good, the emails get
    sent.

    The part that confuses me is that in my code, no matter
    what i set the cdoSMTPServer field for the
    CDO.Configuration object to, it always works. I guess it's
    using the smarthost field in the SMTP Virtual Server to
    get the name of the server to use...but how will this all
    work out on a different computer??

    (What i would really like is for the code to use the
    server specified in the cdoSMTPServer field instead of
    relying on the configuration of the SMTP Virtual Server.)

    Cheers
    Dune Guest

  2. Similar Questions and Discussions

    1. CDOSYS vs CDONTS
      hello i have resently installed win 2003 web. me and my clients are used to use CDONTS and have meny asp pages configured fore it BUT 2003 uses...
    2. CDOSYS NNTP
      Is it possible to send/receive nntp messages via CDOSYS without a 3rd party news component? The NNTP links I have found appear to be related to MS...
    3. CDOSYS URL namespace... Huh?
      I've looked all over the world (via Google) and found a few sample snippets of CDOSYS Message object. (And even more sites that merely copy the...
    4. cdosys.dll problem
      Hi, I had my ASP .NET application in my windows 2000 Server and IIS5. It had been working fine for 9 months. Because of virus threatening of last...
    5. exim to exim4 smarthost question
      -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 What would the exim4 equivilent of this? (in the Routers section) smarthost: driver =...
  3. #2

    Default Re: CDOSYS and smarthost

    Can you show your code? If you are specifying a server but mail is going to
    the local folders, then you must be using cdoSendUsingPickup rather than
    cdoSendUsingPort. I'll guess that if you use [url]www.timbuktu_doesn't[/url]
    _exist.com it will still work, because CDO is ignoring the server name
    you're sending because your code is telling it to use the local mail
    folders.

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]




    "Dune" <anonymous@discussions.microsoft.com> wrote in message
    news:077d01c3d590$e2b3ffc0$a301280a@phx.gbl...
    > I'm trying to send an email from my ASP page using
    > CDO.Message and CDO.Configuration. I couldn't get this to
    > work for ages and all my emails ended up in
    > inetpub\mailroot\queue.
    >
    > I'm behind a firewall and finally figured out that i have
    > to set the smarthost field for the SMTP Virtual Server in
    > IIS to get any emails to send. All good, the emails get
    > sent.
    >
    > The part that confuses me is that in my code, no matter
    > what i set the cdoSMTPServer field for the
    > CDO.Configuration object to, it always works. I guess it's
    > using the smarthost field in the SMTP Virtual Server to
    > get the name of the server to use...but how will this all
    > work out on a different computer??
    >
    > (What i would really like is for the code to use the
    > server specified in the cdoSMTPServer field instead of
    > relying on the configuration of the SMTP Virtual Server.)
    >
    > Cheers

    Aaron Bertrand [MVP] Guest

  4. #3

    Default CDOSYS and smarthost

    hmmm, sorry, posted in wrong place!!
    >-----Original Message-----
    >I'm trying to send an email from my ASP page using
    >CDO.Message and CDO.Configuration. I couldn't get this to
    >work for ages and all my emails ended up in
    >inetpub\mailroot\queue.
    >
    >I'm behind a firewall and finally figured out that i have
    >to set the smarthost field for the SMTP Virtual Server in
    >IIS to get any emails to send. All good, the emails get
    >sent.
    >
    >The part that confuses me is that in my code, no matter
    >what i set the cdoSMTPServer field for the
    >CDO.Configuration object to, it always works. I guess
    it's
    >using the smarthost field in the SMTP Virtual Server to
    >get the name of the server to use...but how will this all
    >work out on a different computer??
    >
    >(What i would really like is for the code to use the
    >server specified in the cdoSMTPServer field instead of
    >relying on the configuration of the SMTP Virtual Server.)
    >
    >Cheers
    >.
    >
    Dune Guest

  5. #4

    Default Re: CDOSYS and smarthost

    here's my code:

    Dim iMsg
    Set iMsg = Server.CreateObject("CDO.Message")

    Dim iConf
    Set iConf = Server.CreateObject("CDO.Configuration")

    Dim Flds
    Set Flds = iConf.Fields
    Flds("cdoSendUsingMethod") = 2 'cdoSendUsingPort
    ' this is actually set to the server name in my code
    Flds("cdoSMTPServer") = "smarthostServerName"
    Flds("cdoSMTPServerPort") = 25
    Flds("cdoSMTPAuthenticate") = 0 'cdoAnonymous
    Flds.Update

    With iMsg
    Set .Configuration = iConf
    .To = Request.Form("txtEmail")
    .From = "helpdesk@quotable.co.nz"
    .Sender = "helpdesk@quotable.co.nz"
    .Subject = "QVNZ - Reset Password"
    .TextBody = "This is a test email."
    .Send
    End With

    Set iMsg = Nothing
    Set iConf = Nothing

    >-----Original Message-----
    >Can you show your code? If you are specifying a server
    but mail is going to
    >the local folders, then you must be using
    cdoSendUsingPickup rather than
    >cdoSendUsingPort. I'll guess that if you use
    [url]www.timbuktu_doesn't[/url]
    >_exist.com it will still work, because CDO is ignoring
    the server name
    >you're sending because your code is telling it to use the
    local mail
    >folders.
    >
    >--
    >Aaron Bertrand
    >SQL Server MVP
    >[url]http://www.aspfaq.com/[/url]
    >
    >
    >
    >
    >"Dune" <anonymous@discussions.microsoft.com> wrote in
    message
    >news:077d01c3d590$e2b3ffc0$a301280a@phx.gbl...
    >> I'm trying to send an email from my ASP page using
    >> CDO.Message and CDO.Configuration. I couldn't get this
    to
    >> work for ages and all my emails ended up in
    >> inetpub\mailroot\queue.
    >>
    >> I'm behind a firewall and finally figured out that i
    have
    >> to set the smarthost field for the SMTP Virtual Server
    in
    >> IIS to get any emails to send. All good, the emails get
    >> sent.
    >>
    >> The part that confuses me is that in my code, no matter
    >> what i set the cdoSMTPServer field for the
    >> CDO.Configuration object to, it always works. I guess
    it's
    >> using the smarthost field in the SMTP Virtual Server to
    >> get the name of the server to use...but how will this
    all
    >> work out on a different computer??
    >>
    >> (What i would really like is for the code to use the
    >> server specified in the cdoSMTPServer field instead of
    >> relying on the configuration of the SMTP Virtual
    Server.)
    >>
    >> Cheers
    >
    >
    >.
    >
    Dune Guest

Posting Permissions

  • You may not post new threads
  • You may 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