%
function sendemail(sendto,subject,txt)
On Error Resume Next
EmailShopName = "CNTOVideo.org"
Set jmail = Server.CreateObject("JMAIL.Message") 'create send mail object
jmail.silent = true 'not show the exception, return true, false
Jmail.logging = true 'use the mail log
jmail.Charset = "ISO-8859-1" 'mail encoding
jmail.ContentType = "text/html" 'mail format:HTML
jmail.AddRecipient sendto 'mail receiver address
jmail.AddRecipientbcc "jcao@microseven.com"
jmail.AddRecipientbcc "la@cnto.org "
jmail.From = "la@cnto.org" 'sender's address
jmail.MailServerUserName = "sender@hrctech.com" 'user name for login the smtp server
jmail.MailServerPassword = "M7microseven20540C" 'password for login the smtp server
jmail.Subject = subject 'mail subject
jmail.Body = txt 'mail contents
jmail.Send("mail.hrctech.com") 'send mail through smtp server
jmail.Close() 'close send mail object
if err.number<>0 then
Response.write "Error # " & CStr(Err.Number) & " " & Err.Description
err.clear
'response.end
end if
end function
'send to addr and support
function sendemail2(from, subject, txt)
On Error Resume Next
Set jmail = Server.CreateObject("JMAIL.Message") 'create send mail object
jmail.silent = true 'not show the exception, return true, false
Jmail.logging = true 'use the mail log
jmail.Charset = "ISO-8859-1" 'mail encoding
jmail.ContentType = "text/html" 'mail format:HTML
jmail.AddRecipient "la@cnto.org" 'mail receiver address
jmail.AddRecipientbcc "jcao@microseven.com"
jmail.From = from 'sender's address
jmail.MailServerUserName = "sender@hrctech.com" 'user name for login the smtp server
jmail.MailServerPassword = "M7microseven20540C" 'password for login the smtp server
jmail.Subject = subject 'mail subject
jmail.Body = txt 'mail contents
jmail.Send("mail.hrctech.com") 'send mail through smtp server
jmail.Close() 'close send mail object
if err.number<>0 then
Response.write "Error # " & CStr(Err.Number) & " " & Err.Description
err.clear
'response.end
end if
end function
function GetSubject(OrderNumber)
GetSubject = "Order Confirmation (# " &OrderNumber& ")"
end function
function GetContent (FirstName,LastName,companyname)
GetContent = "Dear" & FirstName & LastName & ","
GetContent = GetContent & "Thank you for interesting with "& companyname & ". We would like to confirm that your order has been received. Below you will find a summary of the products and services ordered for your account. Please print or save this email for future reference."
GetContent = GetContent & "Here is the order information same as the view order from admin."
end function
Function bytes2BSTR(vIn)
Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,NextCharCode
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function
Function GetPageByURL(url)
Server.ScriptTimeOut =100
set oSend=createobject("Microsoft.XMLHTTP")
SourceCode = oSend.open ("GET",url,false)
oSend.send()
GetPageByURL = bytes2BSTR(oSend.ResponseBody)
end Function
%>