Forum Moderators: open

Message Too Old, No Replies

Help neede for comments.asp page

Persits asp email HELP NEEDED!

         

tim1smith1

7:36 pm on Jul 22, 2003 (gmt 0)

10+ Year Member



Hi everyone,
I have recently changed my web hosting company. The asp coding for a 'submit to a newsletter page' worked on my other host, but it does not now.

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

defanjos

8:49 pm on Jul 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to webmaster world

Try the ASPEmail manual here [aspemail.com]

gangstah

8:52 pm on Jul 22, 2003 (gmt 0)

10+ Year Member



Here's what I got from Persists' Web site (http://www.aspemail.com/manual_02.html)

'' 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

tim1smith1

9:07 pm on Jul 22, 2003 (gmt 0)

10+ Year Member



Thanks for everyones' help!

With your advice I have sorted it quick!

Regards

Tim