Forum Moderators: open
The hosting company said i would have to use Persits asp email which is present on their server.
Please can someone change the relevant parts of this coding when they have some free time so that I can use it on their server.
Any help greatly appreciated...
Regards
Tim
<%
' on error resume next
dim tSource
dim bError
dim body
tSource=request.querystring("src")
if tSource<>"" then
'form submitted
tName=request.form("txtName")
tAddress=request.form("txtAddress")
tPostcode=request.form("txtPostcode")
tCountry=request.form("txtCountry")
tEmail=request.form("txtEmail")
tTel=request.form("txtTel")
tComments=request.form("txtComments")
tVia=request.form("txtVia")
tNameF=request.form("txtNameF")
tAddressF=request.form("txtAddressF")
tPostcodeF=request.form("txtPostcodeF")
tCountryF=request.form("txtCountryF")
tEmailF=request.form("txtEmailF")
tTelF=request.form("txtTelF")
body = "This Newsletter request is generated from the natureform.co.uk web site. Below is what was submitted." & VbCrLf & VbCrLf
body = body + "Name - "
body = body + tName & VbCrLf
body = body + "Address - "
body = body + tAddress & VbCrLf
body = body + "Postcode - "
body = body + tPostcode & VbCrLf
body = body + "Country - "
body = body + tCountry & VbCrLf
body = body + "Email - "
body = body + tEmail & VbCrLf
body = body + "Telephone - "
body = body + tTel & VbCrLf
body = body + "Comments - "
body = body + tComments & VbCrLf
body = body + "Site Via - "
body = body + tVia & VbCrLf & VbCrLf
body = body + "Friends' Name - "
body = body + tNameF & VbCrLf
body = body + "Friends' Address - "
body = body + tAddressF & VbCrLf
body = body + "Friends' Postcode - "
body = body + tPostcodeF & VbCrLf
body = body + "Country - "
body = body + tCountryF & VbCrLf
body = body + "Friends' Email - "
body = body + tEmailF & VbCrLf
body = body + "Friends' Telephone - "
body = body + tTelF & VbCrLf & VbCrLf
body = body + "End of account request." & VbCrLf
' Create DevMailer Object
Set Mailer = CreateObject("Geocel.Mailer")
' Add first SMTP server
Mailer.AddServer "213.165.128.146",25
Try the ASPEmail manual here [aspemail.com]
'' instantiate object
Set Mailer = Server.CreateObject("Persits.MailSender")
'' set mail server
Mailer.Host "213.165.128.146"
'' where you want your email to originate from
Mailer.From = "email@yourwebsite.com
'' a name to display in your mail reader
Mailer.FromName = "Some Name"
'' where the email will go to
Mailer.AddAddress = "where_the_email@goes.com"
'' subject and body
Mailer.Subject = "Your subject"
Mailer.Body = body
'' send
Mailer.Send
Hope that helps.
'' check for errors.
If Err.Number <> 0 Then
Err.Description
End If