<% Set arrTo = Session("arrTo") Set arrCc = Session("arrCC") Set arrBcc = Session("arrBcc") Set arrFiles = Session("arrFiles") 'org name, contact, address,contry, email ,phone, comments ' DO NOT CHANGE THIS - A USER HAS BEEN CREATED SO THAT MAILS SENT FROM THE SITE ARE AUTHENTIC MAILS Mail.Username = "webmail@anistea.com" Mail.Password = "webmail" ' Handle "Send Message" button Mail.Host = "mail.anistea.com" ' replace it with your own SMTP server address If Request("SEND") <> "" Then ' get addresses from collections Items = arrTo.Items For i = 0 to arrTo.Count - 1 Mail.AddAddress Items(i) Next Mail.AddAddress "anistea@sltnet.lk" 'Mail.AddAddress "add web master email" Mail.From = "webmail@anistea.com" Mail.FromName = "Web Site Inquiry" Mail.Subject = Request("Subject") Mail.Body = "Organisation: " & Request("Organisation") & VbCrLf & "Postal Address: " & Request("PostalAddress") &_ vbcrlf & "Country: " & Request("Country") & vbcrlf & "Email: " & Request("MyEmail") &_ vbcrlf & "Phone: " & Request("Phone") & vbcrlf & "Comments: " & Request("Body") ' Mail.Body = Request("Organisation") ErrStr = "" If Request("Signature") <> "" Then ' Send signed message. Use Persits Software AspEncrypt (www.aspencrypt.com) Set CM = Server.CreateObject("Persits.CryptoManager") Set Context = CM.OpenContext( "", True) Set Msg = Context.CreateMessage CM.LogonUser "", "webmail@anistea.com", "webmail" Set Store = CM.OpenStore( "MY", True) ' use your own signer certificate serial number here Set SignerCert = Store.Certificates("67D1 4E91 A7EF DDA8 490E BC7D 5621 CA1C") Msg.SetSignerCert SignerCert On Error Resume Next Mail.SendSigned Msg If Err <> 0 Then ErrStr = Err.Description Else arrTo.RemoveAll arrCc.RemoveAll arrBcc.RemoveAll arrFiles.RemoveAll ErrStr = "success" End If On Error Goto 0 ' cancel On Error Resume Next Else ' send regular (no signature) On Error Resume Next if not Mail.Send Then ErrStr = Err.Description Else arrTo.RemoveAll arrCc.RemoveAll arrBcc.RemoveAll arrFiles.RemoveAll ErrStr = "success" End If On Error Goto 0 ' cancel On Error Resume Next End If ' send signed? End If ' Handle "Add Address" buttons Session("Count") = Session("Count") + 1 If Request("Address") <> "" Then arrTo.Add Session("Count"), CStr(Request("Address")) If Request("CCAddress") <> "" Then arrCc.Add Session("Count"), CStr(Request("CCAddress")) If Request("BccAddress") <> "" Then arrBcc.Add Session("Count"), CStr(Request("BccAddress")) ' Handle Delete command If Request("DeleteTo") <> "" Then arrTo.Remove CInt(Request("DeleteTo")) If Request("DeleteCc") <> "" Then arrCc.Remove CInt(Request("DeleteCc")) If Request("DeleteBcc") <> "" Then arrBcc.Remove CInt(Request("DeleteBcc")) %> Feel the difference – Anis Commercial Enterprises , Exporters of Quality Tea to the world since 1983
Anis Commercial Enterprises
Tea Department

NO. 33, New Moor Street,
Colombo 12,
Sri Lanka.

FACIMILE: 94 11 2445006
PHONE: 94 11 2430388
E-Mail: anistea@sltnet.lk

Subject: ">
Organisation: ">
Address: ">
Country:
Email: ">
Phone: ">
Comments:
<% If ErrStr <> "" and ErrStr <> "success" Then %> Message was not sent due to the following error: <% = ErrStr %> <% Else %> <% If ErrStr = "success" Then %> Message was sent successfully. <% End If %> <% End If %>