Hi all,
I have created a web ordering form. My question is I am trying to create 2 buttons. On my admin side.
Button One) - If the admin clicks this button it will shot off an email to another admin for shipping.
Button Two) - If the admin rejects the order this button will need to send an email to a different admin.
So how do I send email to two different email address on the same form? I am trying to use CDO (Collaboration Data Objects) to create and send the emails. My CDO code is below can anyone help?
<%
Dim Approve
Dim Reject
If Approve Then
Dim objNewMail
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
' First create an instance of NewMail Object
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = "John@test.com"
objNewMail.To = "John@test.com"
objNewMail.Subject = "Order Request. <automated message>"
objNewMail.Body = "Order Request. <automated message>"
objNewMail.Send
Set objNewMail = Nothing
ElseIf Reject Then
' CDO to rejected email address
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
' First create an instance of NewMail Object
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = "John@test.com"
objNewMail.To = "John@test.com"
objNewMail.Subject = "Order Request. <automated message>"
objNewMail.Body = "Order Request. <automated message>"
objNewMail.Send
Set objNewMail = Nothing
End If
%>