Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ASP SCRIPT HELP

Featured Replies

Hi Guys

 

i am trying to create an ASP contact from for a customer as there hosting server does not have php installed and they dont want to pay the extra money to do so.

 

I have tried to create a ASP contact form for which when you fill the details out on the form and click send it comes up with message sent but there is no message arriving in the inbox from the site.

 

Please look at the script below and advice please

 

The server details im trying to connect to are

 

Mail POP3 - pop.clara.net

SMTP Relay Record - smtp-vh.clara.net

Webmail & Mail Filters - toaster-vh.clara.net

 

 

Here is the script

 

 

[color="#2E8B57"]<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>contact_us.asp</title>

<style type="text/css">

<!--

.style1 {

color: #0066CC;

font-weight: bold;

}

-->

</style>

</head>

 

<body>

<p align="center">

<%

Const cdoSendUsingMethod = _

"http://schemas.microsoft.com/cdo/configuration/sendusing"

Const cdoSendUsingPort = 2

Const cdoSMTPServer = _

"http://schemas.microsoft.com/cdo/configuration/smtpserver"

Const cdoSMTPServerPort = _

"http://schemas.microsoft.com/cdo/configuration/smtpserverport"

Const cdoSMTPConnectionTimeout = _

"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"

Const cdoSMTPAuthenticate = _

"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"

Const cdoBasic = 1

Const cdoSendUserName = _

"http://schemas.microsoft.com/cdo/configuration/sendusername"

Const cdoSendPassword = _

"http://schemas.microsoft.com/cdo/configuration/sendpassword"

 

Dim objConfig ' As CDO.Configuration

Dim objMessage ' As CDO.Message

Dim Fields ' As ADODB.Fields

Dim FirstName, Surname, Email, Website, Message

 

FirstName = Request.Form("FirstName")

Surname = Request.Form("Surname")

Email = Request.Form("Email")

Website = Request.Form("Website")

Message = Request.Form("Message")

 

' Get a handle on the config object and it's fields

Set objConfig = Server.CreateObject("CDO.Configuration")

Set Fields = objConfig.Fields

 

' Set config fields we care about

With Fields

.Item(cdoSendUsingMethod) = cdoSendUsingPort

.Item(cdoSMTPServer) = "< toaster-vh.clara.net >"

.Item(cdoSMTPServerPort) = 25

.Item(cdoSMTPConnectionTimeout) = 10

.Item(cdoSMTPAuthenticate) = cdoBasic

.Item(cdoSendUserName) = "< something@co.uk >"

.Item(cdoSendPassword) = "< password >"

 

.Update

End With

 

Set objMessage = Server.CreateObject("CDO.Message")

 

Set objMessage.Configuration = objConfig

 

With objMessage

.To = "< enquiries@website.co.uk >"

.From = "< enquiries@website.co.uk >"

.Subject = "SMTP Relay Test"

.TextBody = "SMTP Relay Test Sent @ " & Now() & vbCrLf & "Surname: " & Surname

& vbCrLf & "First Name: " & FirstName & vbCrLf &

"Email: " & Email & vbCrLf & "Message: " & Message

 

.Send

End With

 

Set Fields = Nothing

Set objMessage = Nothing

Set objConfig = Nothing

%>

</p>

<p align="center"><img src="images/Contactlogo.png" width="414" height="40" /></p>

<p align="center" class="style1"><a href="something&CanoeHire.html">Click Here to Return to Home Page </a></p>

</body>

</html>[/color]

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.