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.

Microsoft VBScript runtime (0x800A01A8)

Discussion in 'C#' started by david.j, Mar 3, 2009.

  1. #1
    i am facing this problem
    Microsoft VBScript runtime (0x800A01A8)
    Object required: ''




    <body>
    <%
    flage="t"

    sName=Request.form("txtName")
    sEmail=Request.form("txtEmailId")
    phone=Request.form("txtphone")
    post=Request.form("postappliedfor")
    cv=request.form("T2")
    dim b
    dim a
    b=split(cv,".")

    a=split(cv,"\")
    'response.Write(a(4))



    Set cdoConfig = Server.CreateObject("CDO.Configuration")

    With cdoConfig.Fields
    .Item(cdoSendUsingMethod) = cdoSendUsingPort
    .Item(cdoSMTPServer) = ""
    .Item(cdoSMTPServerPort)=25
    .Item(cdoSMTPAuthenticate) = 1
    .Item(cdoSendUsername) = ""
    .Item(cdoSendPassword) = "test123"
    .Update
    End With
    Set cdoMessage = Server.CreateObject("CDO.Message")
    With cdoMessage

    Set cdoMessage.Configuration = cdoConfig

    cdoMessage.From = sName&"<"&semail&">"
    cdoMessage.To = "com"
    for each file in Upload.Files
    fn=File.ExtractFilename
    cdoMessage.AddAttachment Server.MapPath(fn),fn
    next
    if(b(1)="doc") then

    .Subject = subject
    .htmlBody = sMsg
    .Send
    flage="t"
    else

    flage="f"

    end if

    cdoMessage.Subject = "Application from "&sName
    cdoMessage.HTMLBody =sMsg

    cdoMessage.Send


    End With
    If Err.Number = 0 Then
    Response.Write("Mail sent!")
    Else
    Response.Write("Error sending mail. Code: " & Err.Number)
    Err.Clear
    End If
    Set cdoMessage = Nothing
    Set cdoConfig = Nothing




    %>
    please help me
     
    david.j, Mar 3, 2009 IP
  2. suraj_ajax

    suraj_ajax Peon

    Messages:
    26
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    can u please post excat error msg.. i mean the lines in which error is occuring..
     
    suraj_ajax, Mar 3, 2009 IP
  3. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #3
    in the following lines
    
    With cdoMessage
    
    Set cdoMessage.Configuration = cdoConfig
    
    cdoMessage.From = sName&"<"&semail&">"
    cdoMessage.To = "com"
    
    ...........
    
    Code (markup):
    is it because you are still using cdoMessage in the With Block? I'm not sure if this would cause an error
     
    camjohnson95, Mar 4, 2009 IP
  4. david.j

    david.j Peon

    Messages:
    180
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4

    hello it take problem here
    fn=File.ExtractFilename
    cdoMessage.AddAttachment Server.MapPath(fn),fn
     
    david.j, Mar 5, 2009 IP