Having some issues gettting this mailer to go to a newline in the email, I’m aware that in php you have to define headers to get the newline characters to work, but im unsure of why this wont work:
<%
Dim EmailFrom
Dim EmailTo
Dim Subject
Dim FirstName
Dim LastName
Dim email
Dim Telephone
Dim Title
Dim Company
Dim Address
Dim City
Dim State
Dim Country
Dim ZipCode
Dim Comment
EmailFrom = "edited"
Subject = "Contact submission - "&Date()
EmailTo = "edited"
'"edited"
FirstName = Trim(Request.Form("FirstName"))
LastName = Trim(Request.Form("LastName"))
email = Trim(Request.Form("email"))
Telephone = Trim(Request.Form("Telephone"))
Title = Trim(Request.Form("Title"))
Company = Trim(Request.Form("Company"))
Address = Trim(Request.Form("Address"))
City = Trim(Request.Form("City"))
State = Trim(Request.Form("State"))
Country = Trim(Request.Form("Country"))
ZipCode = Trim(Request.Form("ZipCode"))
Comment = Trim(Request.Form("Comment"))
Dim validationOK
validationOK=true
If (Trim(FirstName)="") Then validationOK=false
If (Trim(LastName)="") Then validationOK=false
If (Trim(email)="") Then validationOK=false
If (validationOK=false) Then Response.Redirect("contacterror.shtml?" & EmailFrom)
Dim Body
Body = Body & "FirstName: " & FirstName & VbCrLf
Body = Body & "LastName: " & LastName & VbCrLf
Body = Body & "email: " & email & VbCrLf
Body = Body & "Telephone: " & Telephone & VbCrLf
Body = Body & "Title: " & Title & VbCrLf
Body = Body & "Company: " & Company & VbCrLf
Body = Body & "Address: " & Address & VbCrLf
Body = Body & "City: " & City & VbCrLf
Body = Body & "State: " & State & VbCrLf
Body = Body & "Country: " & Country & VbCrLf
Body = Body & "ZipCode: " & ZipCode & VbCrLf
Body = Body & "Comments: " & Comment & VbCrLf
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "212.143.17.250"
.Item(sch & "smtpserverport") = 25 ' if you need to set a port number
.update
End With
Set cdoMessage = CreateObject ("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = EmailFrom
.To = EmailTo
.Subject = Subject
.HTMLBody = Body
On Error Resume Next
echo "Sending..."
.Send
End With
If Err.Number <> 0 Then
echo "Send failed - error = " & Err.Number
Else
Response.Redirect("contactsuccess.shtml?" & EmailFrom)
End If
echo "EXIT: Email_Owner"
%>
I’ve tried using "
", "
", "
", “<br>”, “VbCrLf”, “Environment.newLine”, etc… just not working.