Forum Moderators: open

Message Too Old, No Replies

Cdonts

sending different html to CC using CDONTS

         

stecol

3:56 pm on Jul 1, 2005 (gmt 0)



Hi,

OK i have produced a form for requesting orders of IT equipment within my organisation which sends an email notification and receipt using CDONTS once submitted. What I need to do is add an additional bit of HTML (a hyperlink to the database) in the confirmation email which will not be included in the receipt for the customer.
So referring to my code snippet below..

objCDO.To = "tom@tom.com; jerry@jerry.com"

...tom and jerry (!) will receive the additional bit of HTML which will basically be a hyperlink to the database to check the order.

And the customer...

objCDO.Cc = x_Email

will not see the hyperlink in their receipt.

Hope this makes sense and someone can help, please see code below...

if Request.Form("Action") = "REQUEST THIS ORDER" then

Dim objCDO

Set objCDO = Server.CreateObject("CDONTS.NewMail")

objCDO.From = "tom@tom.com"

objCDO.To = "tom@tom.com; jerry@jerry.com"

objCDO.Cc = x_Email

objCDO.Bcc = ""

objCDO.Subject = "E-procurement - new order request SUBMITTED / (ID:" & key & ")"

'---below is what sends the HTML format to email address---'

bodyHTML = "<html><head></head><body>" & "<font color=""red"">" & "Receipt for E-procurement order request" & "<br>" & "<font color=""blue"">" & "You will receive your unique ID for this order once the request has been authorised" & "<font color=""black"">" & "<br>" & "<br>" & "ID: " & x_ID & "<br>" & "Date(dd/mm/yy): " & x_Date & "<br>" & "Name: " & x_Name & "<br>" & "Email: " & x_Email & "<br>" & "Section: " & x_Section & "<br>" & "Extension: " & x_Extension & "<br>" & "Expenditure Code: " & x_Expenditure_Code & "<br>" & "Hardware Requirements: " & x_Hardware_Requirements & "<br>" & "Hardware Quantity: " & x_Hardware_Quantity & "<br>" & "Hardware Rational: " & x_Hardware_Rational & "<br>" & "Hardware Cost: " & x_Hardware_Cost & "<br>" & "Software Requirements: " & x_Software_Requirements & "<br>" & "Software Quantity: " & x_Software_Quantity & "<br>" & "Software Rational: " & x_Software_Rational & "<br>" & "Software Cost: " & x_Software_Cost & "<br>" & "Internet Requirements: " & x_Internet_Requirements & "<br>" & "Internet Quantity: " & x_Internet_Quantity & "<br>" & "Internet Rational: " & x_Internet_Rational & "<br>" & "Internet Cost: " & x_Internet_Cost & "<br>" & "Outlook Requirements: " & x_Outlook_Requirements & "<br>" & "Outlook Quantity: " & x_Outlook_Quantity & "<br>" & "Outlook Rational: " & x_Outlook_Rational & "<br>" & "Outlook Cost: " & x_Outlook_Cost & "<br>" & "Total Cost: " & x_Total

objCDO.Body = bodyHTML

objCDO.BodyFormat = 0

objCDO.MailFormat = 0

objCDO.Send

ConfirmMsg = "Your order has been sent to the E Communications Team, please check your email for a receipt.<br><br>Once the costs are worked out and the rationale authorised, we will send a final updated email to you with your unique ID number and total costs. If you are happy for the order to go ahead you can reply to the email or phone (quoting your ID number) to confirm the order."

end if

mattur

4:28 pm on Jul 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Send two emails, one with the hyperlink, one without.

CC stands for "carbon copy" (or "courtesy copy") - the clue is in the name... ;)