%
'set the response buffer to true so we execute all asp code before sending the html to the clients browser
response.buffer = true
'dimension variables
dim strbody 'holds the body of the e-mail
dim objcdomail 'holds the mail server object
dim strmyemailaddress 'holds your e-mail address
dim strccemailaddress 'holds any carbon copy e-mail addresses if you want to send carbon copies of the e-mail
dim strbccemailaddress 'holds any blind copy e-mail addresses if you wish to send blind copies of the e-mail
dim strreturnemailaddress 'holds the return e-mail address of the user
'----------------- place your e-mail address in the following sting ----------------------------------
strmyemailaddress = "bjtzh@hotmail.com"
'----------- place carbon copy e-mail address's in the following sting, separated by ; --------------
strccemailaddress = "" 'use this string only if you want to send the carbon copies of the e-mailto:farrell@fuli-furniture.com
'----------- place blind copy e-mailto:farrell@fuli-furniture.com address's in the following sting, separated by ; --------------
strbccemailaddress = "" 'use this string only if you want to send the blind copies of the e-mailto:farrell@fuli-furniture.com
'-----------------------------------------------------------------------------------------------------
'read in the users e-mail address
strreturnemailaddress = request.form("email")
'initialse strbody string with the body of the e-mail
strbody = "
邮件正文: - " & replace(request.form("enquiry"), vbcrlf, " ")
'check to see if the user has entered an e-mail address and that it is a valid address otherwise set the e-mail address to your own otherwise the e-mail will be rejected
if len(strreturnemailaddress) < 5 or not instr(1, strreturnemailaddress, " ") = 0 or instr(1, strreturnemailaddress, "@", 1) < 2 or instrrev(strreturnemailaddress, ".") < instr(1, strreturnemailaddress, "@", 1) then
'set the return e-mail address to your own
strreturnemailaddress = strmyemailaddress
end if
'send the e-mail
'create the e-mail server object
set objcdomail = server.createobject("cdonts.newmail")
'who the e-mail is from (this needs to have an e-mail address in it for the e-mail to be sent)
objcdomail.from = request.form("firstname") & "<" & strreturnemailaddress & ">"
'who the e-mail is sent to
objcdomail.to = strmyemailaddress
'who the carbon copies are sent to
objcdomail.cc = strccemailaddress
'who the blind copies are sent to
objcdomail.bcc = strbccemailaddress
'set the e-mail body format (0=html 1=text)
objcdomail.bodyformat = 0
'set the mail format (0=mime 1=text)
objcdomail.mailformat = 0
'set the subject of the e-mail
objcdomail.subject = "的信件"
'set the main body of the e-mail
objcdomail.body = strbody
'importance of the e-mail (0=low, 1=normal, 2=high)
objcdomail.importance = 1
'send the e-mail
objcdomail.send
'close the server object
set objcdomail = nothing
%>
香港富丽法雷尔家私制造有限公司