%@LANGUAGE="VBSCRIPT"%>
<%
strError = ""
sent = 0
If Request.QueryString("OP") = "VAL" Then
txtName = Request.Form("TXTNAME")
txtEmail = Request.Form("TXTEMAIL")
txtCompany = Request.Form("TXTCOMPANY")
txtTelephone = Request.Form("TXTTELEPHONE")
txtFax = Request.Form("TXTFAX")
txtAddress = Request.Form("TXTADDRESS")
txtPostcode = Request.Form("TXTPOSTCODE")
txtMessage = Request.Form("TXTMESSAGE")
Mailing = Request.Form("MAILING")
If txtName = "" OR txtEmail = "" OR txtCompany = "" OR txtPostcode = "" Then
strError = "You must enter your name, company, email address and postcode.
Please go back and correct."
Else
Dim oMailer
Set oMailer = Server.CreateObject("MailBee.SMTP")
oMailer.LicenseKey = "MBC500-4E4EEE6C0E-0A4FD6A07A6FDD429BCE45A258C78F95"
oMailer.ServerName = "smtp.star.co.uk"
oMailer.Message.FromAddr = txtName & " <" & txtEmail & ">"
oMailer.Message.Subject = "BOS Website Contact"
oMailer.Message.BodyText = txtMessage & vbcrlf & vbcrlf & txtCompany & vbcrlf & txtTelephone & vbcrlf & txtFax & vbcrlf & txtAddress & vbcrlf & txtPostcode & vbcrlf & vbcrlf & "Subscribe to newsletter: " & Mailing
oMailer.Message.BodyFormat = 0
oMailer.MakeAltBody
oMailer.Message.ToAddr = "sales@bos-office-supplies.co.uk"
If oMailer.SendtoQueue("D:\MailBeeQ") Then
Sent = 1
Else
Sent = 0
End If
If oMailer.Connected Then
oMailer.Disconnect
End If
End If
If strError <> "" Then
strMessage = strError
Else
strMessage = "Your email has been sent, thank you for you communication.
"
End If
End If
%>
|
||||||||||||