1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Problem in Email with attachment using ASP CDO.Message

Discussion in 'C#' started by rsk_beckon, Sep 3, 2009.

  1. #1
    Dear All

    I am new to ASP. I want to send the attachment along with the mail when user register. User will fill particulars and attach their resume and will send it to our mail. when i used CdoObject.AddAttachment i am getting an error
    CDO.Message.1 error '80070002' The system cannot find the file specified. By google search I learnt that while attaching and sending the file as email, one should first upload the file to the hosting server and then attaching will be done. Is it correct? and it is the only way? If yes please suggest me how to upload a single file and attach and send it to email.

    Thanks in Advance

    Regards
    Sasikumar
     
    rsk_beckon, Sep 3, 2009 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    well... what kind of file are you attaching? You could generate it on the fly, have asp save the file realtime, then attach it all in the same script - but you will have to ask your host for write permissions.
     
    ccoonen, Sep 10, 2009 IP
  3. wacamoi

    wacamoi Peon

    Messages:
    810
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Before you create a file you shall have the file's html form.
    You shall be able to send the html form to your mail.
    So just use objMessage.HTMLBody as a result you do not need to create a file and upload a file.

    But for an image file you do need to save or upload it first.
    And change the folder permission ahead.

    try this
    http://www.asp101.com/articles/jacob/scriptupload.asp
     
    Last edited: Sep 11, 2009
    wacamoi, Sep 11, 2009 IP