PDA

View Full Version : Still SMPT Issues


John316
09-19-02, 16:59
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
%>

John316
09-23-02, 17:23
Can someone PLease help me with this problem?

John316

gregsdad
09-23-02, 23:01
Originally posted by John316
Can someone PLease help me with this problem?

John316 Try this link, kind of a piggy back logic.
http://www.frontpagewebmaster.com/tm.asp?m=81405&p=1&tmode=1