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.

CDO.Message.1 error '80040220' - The "SendUsing" configuration value is invalid.

Discussion in 'C#' started by mlungisi, Jul 23, 2010.

  1. #1
    Hi there

    I'm having some issues with ASP classic, we just moved the site from WS2003 to WS2008 and its now failing to send orders.

    The browser displays this message:

    CDO.Message.1 error '80040220'

    The "SendUsing" configuration value is invalid.

    /confirmation_nw.asp, line 81

    and the page code is as follows:



    <script LANGUAGE="vbscript" RUNAT="Server">
    </script>
    <%Response.Buffer = true
    set cnRadiant = server.CreateObject("ADODB.Connection")
    cnRadiant.Open Session("Connection")

    set cnRadOrder = server.CreateObject("ADODB.Connection")
    cnRadOrder.Open "DSN=SQLRadiant;User ID=username;PWD=password"


    Set rsOrder = server.CreateObject("ADODB.Recordset")
    rsOrder.Open "SELECT shopcart.*, Company.Account_no, Company.company, company.contact, company.fax, company.fax_code, company.tel_code, company.telephone, company.email, company.branchcode FROM shopcart, company WHERE shopcart.customer_id = company.company_id AND (shopcart.customer_id = " & trim(Session("Customer_id")) & ")", cnRadiant

    if rsOrder.EOF = false then

    sql = "Insert into OrderHead(order_id, customer_id, order_date, customer_name, cust_order_no, customer_contact, Deliver_collect, confirmation, [special instructions], total, subtotal, vat)"
    sql = sql & "Values('" & Session("order_id") & "','" & Session("Customer_id") & "','" & formatdatetime(now(),vbshortdate) & "','" & Session("company") & "','" & Request("OrderNo") & "','" & Request("OrderSubmittedBy") & "','" & Request("DeliveryCollect") & "','" & Request("Confirmation") & "','" & Request("SpecialInstructions") & "','" & Request("GrandTotal") & "','" & Request("subTotal") & "','" & Request("vat") & "')"
    set rsID2 = cnRadOrder.Execute(sql)

    set rsID = cnRadOrder.Execute("Select order_h_id from OrderHead where (order_id = '" & Session("order_id") & "') AND (customer_id = " & Session("Customer_id") & ")")
    do until rsOrder.EOF
    Sql2 = "Insert into OrderDetail(order_h_id, qty, price, stock_code, config, colour, barcode)"
    Sql2 = Sql2 & "Values('" & rsID(0) & "','" & rsOrder("qty") & "','" & rsOrder("price") & "','" & rsOrder("stock_code") & "','" & rsOrder("config") & "','" & rsOrder("colour") & "','" & rsOrder("barcode") & "')"
    cnRadOrder.Execute(sql2)
    rsorder.MoveNext
    loop



    rsOrder.MoveFirst

    cc = trim(rsOrder("email"))
    FrComp = rsOrder("branchcode") & " - " & rsOrder("Company")
    Body = "The following goods have been ordered through radiant lighting webpage: " & vbcrlf
    Body = Body & "Order ID: " & rsOrder("order_id") & vbcrlf
    Body = Body & "Company: " & trim(rsOrder("company")) & vbcrlf
    Body = Body & "Contact: " & trim(rsOrder("contact")) & vbcrlf
    Body = Body & "Phone: " & vbTab & trim(rsOrder("tel_code")) & "-" & trim(rsOrder("telephone")) & vbcrlf
    Body = Body & "Fax: " & vbTab & trim(rsOrder("fax_code")) & "-" & trim(rsOrder("fax")) & vbcrlf
    Body = Body & "Account No: " & vbTab & trim(rsOrder("Account_no")) & vbCrLf
    Body = Body & "E-mail: " & vbtab & trim(rsOrder("email")) &vbcrlf
    Body = Body & vbcrlf & vbcrlf

    Body = Body & "STOCK CODE," & vbTab & vbTab& "CONFIG," & vbTab & vbTab& "COLOUR," & vbTab & vbTab& "BARCODE," & vbTab & vbTab& "QTY," & vbTab & vbTab& "Price" & vbcrlf
    Total = 0
    do until rsOrder.EOF
    Body = Body & rsOrder("Stock_code") & "," & vbTab& vbTab
    Body = Body & rsOrder("Config") & "," & vbTab& vbTab
    Body = Body & rsOrder("Colour") & "," & vbTab& vbTab
    Body = Body & rsOrder("Barcode") & "," & vbTab& vbTab
    Body = Body & rsOrder("Qty") & "," & vbTab& vbTab
    Body = Body & "R " & FormatNumber(rsOrder("Qty") * rsOrder("price"),2,false,false,false) & vbcrlf

    Total = Total + (rsOrder("Qty") * rsOrder("price"))
    rsOrder.MoveNext
    Loop

    Body = Body & vbcrlf & "Total Order : " & Request("subTotal")
    Body = Body & vbcrlf & "VAT : " & Request("vat")
    Body = Body & vbcrlf & "Total Cost : " & Request("GrandTotal")

    Body = Body & vbcrlf & vbcrlf
    Body = Body & "Order No: " & Request("OrderNo") & vbCrLf
    Body = Body & "Delivery Method: " & Request("DeliveryCollect") & vbCrLf
    Body = Body & "Order Confirmation: " & Request("Confirmation") & vbCrLf

    Body = Body & "Special Instructions: " & Request("SpecialInstructions") & vbCrLf & vbcrlf
    Body = Body & "Order Submitted By: " & Request("OrderSubmittedBy") & vbCrLf
    Body = Body & "Contact: " & Request("Contact") & vbCrLf & vbCrLf



    Set ml = CreateObject("CDO.Message")
    ml.From = "weborder@radiant.co.za"
    ml.To = "weborder@radiant.co.za; wa.radiant@gmail.com"
    ml.CC = cc

    ml.Subject = "Web Order: " & FrComp
    ml.TextBody = Body

    ml.Send ------ error line
    Set ml = Nothing

    cnRadiant.Execute "Delete FROM shopcart WHERE (shopcart.customer_id = " & Session("Customer_id") & ")"

    randomize
    timepart = Day(Now()) & Month(Now()) & Year(Now()) & hour(Time())
    timepart = timepart & (100001 * rnd) * rnd(timepart)
    session("order_id") = Mid(Replace(timepart, ".", ""), 1, 14 )

    end if
    %>

    <html xmlns:mso="urn:schemas-microsoft-com:eek:ffice:eek:ffice" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
    <form action="Products_nw.asp">
    <input type=hidden name=num value="0">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="generator" content="Microsoft FrontPage 6.0">
    <title>Radiant Lighting</title>

    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:Approval_x0020_Level msdt:dt="string">Pending Review</mso:Approval_x0020_Level><mso:Assigned_x0020_To msdt:dt="string">RADIANTJHB\nicola</mso:Assigned_x0020_To><mso:Categories msdt:dt="string"></mso:Categories></mso:CustomDocumentProperties></xml>
    <![endif]-->
    </head>
    <body leftmargin="10" topmargin="0" bgcolor="#B6BD9B" bgproperties="fixed" style="background-attachment:fixed" link="#79443E" vlink="#8F6B47" alink="#954222">
    <%if Session("Customer_id") <> "" then%>
    <table width="650" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td height="15" align="right">
    <font face="Arial, Helvetica, sans-serif" size="1">
    <font color="#AE3924" face="Arial, Helvetica, sans-serif">
    <%=Session("company")%> </font>Logged On | <%=shopcart_total%> items
    in your Basket | </font>
    <font size="2" color="#330066" face="Arial, Helvetica, sans-serif">
    <a href="ViewBasket_nw.asp" style="font-family: Arial, Helvetica, sans-serif; font-size: 9pt; color: #333333; text-decoration: none; font-weight: bold; padding-top: 2px; padding-bottom: 2px">
    <font face="Arial, Helvetica, sans-serif" size="1">
    <font color="#AE3924" face="Arial, Helvetica, sans-serif">VIEW BASKET</font>
    </font></a></font>
    <font face="Arial, Helvetica, sans-serif" size="1">&nbsp;| </font>
    <font face="Arial, Helvetica, sans-serif" size="2" color="#330066">
    <a href="logoff_nw.asp" style="font-family: Arial, Helvetica, sans-serif; font-size: 9pt; color: #333333; text-decoration: none; font-weight: bold; padding-top: 2px; padding-bottom: 2px">
    <font size="1" face="Arial, Helvetica, sans-serif">
    <font color="#7E3A27" face="Arial, Helvetica, sans-serif">LOG OFF&nbsp; </font>
    </font></a></font>
    <font face="Arial, Helvetica, sans-serif" size="1">| </font>
    <font size="1" color="#7E3A27"><a href="dealer_info.asp">
    <span style="font-family: Arial, Helvetica, sans-serif; font-weight: 700; text-decoration: none">
    Contact Details</span></a><span style="font-family: Arial, Helvetica, sans-serif; font-weight: 700; "> </span></font>
    <font face="Arial, Helvetica, sans-serif" size="2" color="#330066">
    <a href="logoff_nw.asp" style="font-family: Arial, Helvetica, sans-serif; font-size: 9pt; color: #333333; text-decoration: none; font-weight: bold; ">
    <font color="#7E3A27" face="Arial, Helvetica, sans-serif" size="1">&nbsp;</font></a></font><font face="Arial, Helvetica, sans-serif" size="1">|&nbsp;
    <a href="dealer_notices_nw.asp">
    <span style="font-weight: 700; text-decoration: none">Notices</span></a></font><font face="Arial, Helvetica, sans-serif" size="2" color="#330066"><a href="logoff_nw.asp" style="font-family: Arial, Helvetica, sans-serif; font-size: 9pt; color: #333333; text-decoration: none; font-weight: bold; padding-top: 2px; padding-bottom: 2px"><font size="1" face="Arial, Helvetica, sans-serif">&nbsp;
    </font></a></font>
    <font face="Arial, Helvetica, sans-serif" size="1">
    </font>
    </td>
    </tr>
    </table><%end if%>
    <table width="650" border="0" cellspacing="1" cellpadding="0">
    <tr>
    <td width="50">&nbsp;</td>
    <td width="730">
    <table width="650" border="0" cellspacing="0" cellpadding="1">
    <tr>
    <td colspan="3">
    <div align="center">
    <p><font size="2" face="Arial, Helvetica, sans-serif" color="#534741"><a href="logoff_nw.asp">LOG
    OFF</a></font></p>
    <p><font face="Arial, Helvetica, sans-serif" size="2" color="#534741"><b>
    <font face="Arial, Helvetica, sans-serif" color="#534741" size="2">Thank
    You </font></b></font> </p>
    <hr width="650">
    <font face="Arial, Helvetica, sans-serif" size="2" color="#534741"><b>
    <font face="Arial, Helvetica, sans-serif" color="#534741" size="2">Your
    Order has been Submitted</font></b></font></div>
    </td>
    </tr>
    </table>
    <div align="right"> </div>
    <hr width="650" align="left">
    </td>
    </tr>
    </table>

    </body>
    <div align="center">
    <input type=submit value="Products Page" style="font-family: Tahoma; font-size: 8pt; color: #534741; background-color: #D8CECD">
    </div>
    </form>

    <table align="left">


    <tr>

    <td>
    <p align="center" style="margin-top: 0; margin-bottom: 0">
    <a href="http://forums.iis.net/AddPost.aspx?ForumID=1032#" onClick="openBrWindow('disclaimer_nw.html','NEWWINDOW','resizable=yes,width=600,height=450')">
    </td> </tr>

    </table>
    </html>
    <% cnRadOrder.Close%>



    Please help, i'm still learning ASP, I've tried to search for similar topics but it didn't help.
    SEMrush
     
    mlungisi, Jul 23, 2010 IP
    SEMrush