Ok, no more erros showing, thanks.
But now my second email code isnt processing...
It should being that the form field data is NY, MS
Only the "NY" email goes through. I know you wont code this, but do you see anything wrong??
Next email code for "MS" starts after the CASE "MS".
<%
Dim warehouse, MyArray
warehouse=Request.Form("warehouse")
MyArray = Split(warehouse,",") 'the delimiter is the comma
For I = 0 to UBound(MyArray)
sState = MyArray(I)
SELECT CASE sState
Case "NY"
' First create an instance of NewMail Object
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = "
[email protected]"
objNewMail.To = rs("email")
objNewMail.Subject = "An Advance Tabco Order From Your NY Factory!"
objNewMail.BodyFormat = CdoBodyFormatHTML
objNewMail.Body = " <BR><img src='http://www.advancetabco.com/pics/AT_emailLogo.jpg' border=0><BR><b>**** EXCESS INVENTORY ORDER! ****</b><BR>If you have any questions regarding this order,<BR>Please contact Customer Service!<BR><BR><b>COMPANY INFO:</b><BR>Order Date: " & Request.Form("date") & "<BR>P.O. Number: " & Request.Form("po") & "<br> " & "Customer Number: " & Request.Form("custcode") & "<BR>"& "Company: " & Request.Form("custname") & "<br>" & "Phone: " & Request.Form("phone") & "<br>" & "Address 1: " & Request.Form("add1") & "<br>" & "Address 2: " & Request.Form("add2") & "<BR>"& "City: " & Request.Form("city") & "<br>"& "State: " & Request.Form("state") & "<br>"&" Zip Code: " & Request.Form("zip") &"<br><br><br><b>SHIPPING INFO:</b><BR>" & "Address 1: " & Request.Form("shipadd1") & "<br>" & "Address 2: " & Request.Form("shipadd2") & "<BR>"& "City: " & Request.Form("shipcity") & "<br>"& "State: " & Request.Form("shipstate") & "<br>"&" Zip Code: " & Request.Form("shipzip") & "<BR>"&" Attention: " & Request.Form("attention") &"<BR>"& Request.Form("warehouse") &"<BR><BR><b>ORDER INFO:</b><BR>"& " "& Request.Form("model") & "<br><br><b>"& "Total Cost: $" & Request.Form("grandtotal") & "</b><br>"
objNewMail.Send
Set objNewMail = Nothing
Case "MS"
' First create an instance of NewMail Object
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
' If you like you can use this one line of code to send the mail.
' objNewMail.Send From, To, Subject, Message
' or you can give every value seperate
objNewMail.From = "
[email protected]"
objNewMail.To = rs("email")
objNewMail.Subject = "An Advance Tabco Order From Your MS Factory!"
objNewMail.BodyFormat = CdoBodyFormatHTML
objNewMail.Body = " <BR><img src='http://www.advancetabco.com/pics/AT_emailLogo.jpg' border=0><BR><b>**** EXCESS INVENTORY ORDER! ****</b><BR>If you have any questions regarding this order,<BR>Please contact Customer Service!<BR><BR><b>COMPANY INFO:</b><BR>Order Date: " & Request.Form("date") & "<BR>P.O. Number: " & Request.Form("po") & "<br> " & "Customer Number: " & Request.Form("custcode") & "<BR>"& "Company: " & Request.Form("custname") & "<br>" & "Phone: " & Request.Form("phone") & "<br>" & "Address 1: " & Request.Form("add1") & "<br>" & "Address 2: " & Request.Form("add2") & "<BR>"& "City: " & Request.Form("city") & "<br>"& "State: " & Request.Form("state") & "<br>"&" Zip Code: " & Request.Form("zip") &"<br><br><br><b>SHIPPING INFO:</b><BR>" & "Address 1: " & Request.Form("shipadd1") & "<br>" & "Address 2: " & Request.Form("shipadd2") & "<BR>"& "City: " & Request.Form("shipcity") & "<br>"& "State: " & Request.Form("shipstate") & "<br>"&" Zip Code: " & Request.Form("shipzip") & "<BR>"&" Attention: " & Request.Form("attention") &"<BR>"& Request.Form("warehouse") &"<BR><BR><b>ORDER INFO:</b><BR>"& " "& Request.Form("model") & "<br><br><b>"& "Total Cost: $" & Request.Form("grandtotal") & "</b><br>"
objNewMail.Send
' After the Send method, NewMail Object become Invalid
' You should set it to nothing to relase the memory
Set objNewMail = Nothing
'etc, etc, etc.
END Select
response.write myArray(i) & "<br>"
Next
%>