If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Still SMPT Issues

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-19-02, 15:59
John316 John316 is offline
Registered User
 
Join Date: Sep 2002
Posts: 68
Question Still SMPT Issues

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
%>
Reply With Quote
  #2 (permalink)  
Old 09-23-02, 16:23
John316 John316 is offline
Registered User
 
Join Date: Sep 2002
Posts: 68
Can Anyone HELP

Can someone PLease help me with this problem?

John316
Reply With Quote
  #3 (permalink)  
Old 09-23-02, 22:01
gregsdad gregsdad is offline
Registered User
 
Join Date: Sep 2002
Posts: 1
Re: Can Anyone HELP

Quote:
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...05&p=1&tmode=1
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On