cdo message attachments

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hugh Welford

    cdo message attachments

    Hi using win XP pro and IIS5 to send asp e-mail to Society members. I am
    trying to send with an attachment using the following code:-

    Set cdoConfig = Server.CreateOb ject("CDO.Confi guration")
    With cdoConfig.Field s
    ..Item(cdoSendU singMethod) = cdoSendUsingPor t
    ..Item(cdoSMTPS erver) = "pegasus.intone t.co.uk"
    ..Update
    End With
    Set cdoMessage = Server.CreateOb ject("CDO.Messa ge")
    With cdoMessage
    Set.Configurati on = cdoConfig
    ..From = "webmaster@andr opause.org.uk"
    ..To = objrec("email")
    ..Subject = "The Andropause Society - Member " & objrec("patid")
    ..HTMLBody = session("text")
    ..AddAttachment "c:\TAS\confere nce 2005\TAS Special Resolution Website
    23.2.05.doc"
    ..Send
    End With
    Set cdoMessage = Nothing
    Set cdoConfig = Nothing
    end if


    The message gets set with no error, but the attachment is not attached. Any
    idea what I am doing wrong?

    Thanks Hugh


  • hh12307
    New Member
    • May 2006
    • 1

    #2
    Hugh - I had the same problem. What seemed to cause it was that I had the attachment file open at the time I executed the AddAttachment command. I had saved the file so it was available to be attached, but it was not being attached. If I CLOSED the file before executing the AddAttachment command, it attached successfully.

    Roger Joy

    Comment

    Working...