Hmm. I am going to make the assumption that you are new to programming period and not just ASP; is that a correct assumption? Also I noticed a problem with my code.
Your code should look like this:
'This should replace the code i have been helping you with since the beining of the post
Select Case sState
Case "NY"
sendEmail("NY", rs("email"))
Case "MS"
sendEmail("MS", rs("email"))
End Select
'This should exist in the same file as the above code
Sub sendEmail(state, sEmailTo)
Dim sEmail
Select Case state
Case "NY"
sEmail = "
[email protected]"
Case "MS"
sEmail= "
[email protected]"
End Select
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = sEmail
objNewMail.To = sEmailTo
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
End Sub
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========