SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2001
    Ottawa, Ontario, CANADA, North America, Earth
    0 Post(s)
    0 Thread(s)

    CDONTS and AttachFile error message

    Need some help please.

    Currently, I have a form that a user can enter the subject line content and the email body content. They can then send the email which I have set up to use CDONTS. This works fine.

    Now I want to add in the ability to attach a file (it will most likely be a MS Word document) to the email being sent out.

    I would like to use CDONTS's AttachFile but it's not working for me. I've read up on it and it seems fairly simple except that I'm getting the following error message.
    error '80004005'
    Unspecified error
    This is the code that I am testing (I have changed the email addresses ):
    set objMail = createobject("CDONTS.NewMail")
    objMail.AttachFile "C:\Graphics\Flowers\pwflowers5.gif"
    objMail.send "", "", "Testing attachfile", "Did you get the attachment"
    set objMail = nothing
    The error occurs on the objMail.AttachFile line. Any ideas?
    [And yes, the file does exist.]
    "Far away there in the sunshine are my highest aspirations. I may not reach them, but I can look up and see their beauty, believe in them, and try to follow where they lead." Louisa May Alcott

  2. #2
    SitePoint Enthusiast mca00's Avatar
    Join Date
    Aug 2000
    0 Post(s)
    0 Thread(s)
    Where is the body of the message, this could be part of the problem.


Posting Permissions

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