Forums
This topic is locked
Email CDONTS script
Posted 22 Oct 2003 07:00:09
1
has voted
22 Oct 2003 07:00:09 chadmih chad posted:
Howdy all. I am at my wits end with this. The script works fine but the "vbNewLine" does not seem to be creating the line breaks correctly. Only one shows up in the final email. Can anyone shed some light on this for me? Your help would be greatly appreciated. Here is the full code:
<% @language="VBSCRIPT" %>
<%
Dim myMail, myBody, mySubject
myBody ="Where: "& request.form("intro" & vbNewLine & "Portfolio demonstration: "& request.form("question1" & vbNewLine & "Portfolio demonstration input: "& request.form("question1input"& vbNewLine & "Design process: "& request.form("question2"& vbNewLine & "Design process input: "& request.form("question2input"& vbNewLine & "Cust. Service rating: "& request.form("question3"& vbNewLine & "Cust. Service input: "& request.form("question3input" & vbNewLine & "Reliability rating: "& request.form("question4"& vbNewLine & "Deadlines rating: " & request.form("question5"& vbNewLine & "Print quality rating: "& request.form("question6" & vbNewLine & "Design quality rating: "& request.form("question7"& vbNewLine & "Design quality input: "& request.form("question7input" & vbNewLine & "Comments: "& request.form("message"& vbNewLine & "Criticism: "& request.form("crit"
mySubject =" "& request.form("subject"
Set myMail = Server.CreateObject ("CDONTS.NewMail"
myMail.From = request.form("email"
myMail.To = " "
myMail.Subject = mySubject
myMail.Body = myBody
myMail.Send
Response.Write("Thank you for your feedback. We appreciate you taking the time to help us make the world a better place."
set myMail=nothing
%>
<h6>JUXTAFLO_</h6>
<img src="www.juxtaflo.com/images/flashkit_footer.jpg" border=0>
Replies
Replied 25 Oct 2003 03:52:59
25 Oct 2003 03:52:59 Alberto Alexander replied:
try vbcrlf instead of vbNewLine, it works just fine in my environment
Replied 25 Oct 2003 04:07:42
25 Oct 2003 04:07:42 chadmih chad replied:
Thanks a lot for the reply. I didnt think anyone would answer.
I had actually tried that. It didnt seem to help at all. I will try it agaain and see how it goes.
Thanks.
<h6>JUXTAFLO_</h6>
<img src="www.juxtaflo.com/images/flashkit_footer.jpg" border=0>
I had actually tried that. It didnt seem to help at all. I will try it agaain and see how it goes.
Thanks.
<h6>JUXTAFLO_</h6>
<img src="www.juxtaflo.com/images/flashkit_footer.jpg" border=0>
Replied 25 Oct 2003 08:12:20
25 Oct 2003 08:12:20 Dan Berdusco replied:
Try using HTML code within your CDONTS Code. This will allow you to use a <pre id=code><font face=courier size=2 id=code><br></font id=code></pre id=code> for a line break. I have attached some sample code that works great for me...
<pre id=code><font face=courier size=2 id=code>
<%
On Error Resume Next
Dim myMail
Set myMail = CreateObject("CDONTS.NewMail"
HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & vbCrLf
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<meta http-equiv=""Content-Type"""
HTML = HTML & "content=""text/html; charset=iso-8859-1"">"
HTML = HTML & "<title>Any Title</title>"
HTML = HTML & "</head>"
HTML = HTML & "<body>"
HTML = HTML & "<font face=""Verdana, Arial, Helvetica, sans-serif"" size=""-1"">"
HTML = HTML & "<b>Name:</b> " & request.form("txtName" & "<br>"
HTML = HTML & "<b>Company Name:</b> " & request.form("txtCompany_Name" & "<br>"
HTML = HTML & "<b>Email Address:</b> " & request.form("txtEmail" & "<br>"
HTML = HTML & "<b>Comments:</b> " & request.form("Contact_Time" & "<br><font></body>"
HTML = HTML & "</html>"
myMail.From = request.form("txtEmail"
myMail.To = " "
myMail.Subject = "Your Subject Here"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = HTML
myMail.Send
Set myMail = Nothing
%>
</font id=code></pre id=code>
<pre id=code><font face=courier size=2 id=code>
<%
On Error Resume Next
Dim myMail
Set myMail = CreateObject("CDONTS.NewMail"
HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & vbCrLf
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<meta http-equiv=""Content-Type"""
HTML = HTML & "content=""text/html; charset=iso-8859-1"">"
HTML = HTML & "<title>Any Title</title>"
HTML = HTML & "</head>"
HTML = HTML & "<body>"
HTML = HTML & "<font face=""Verdana, Arial, Helvetica, sans-serif"" size=""-1"">"
HTML = HTML & "<b>Name:</b> " & request.form("txtName" & "<br>"
HTML = HTML & "<b>Company Name:</b> " & request.form("txtCompany_Name" & "<br>"
HTML = HTML & "<b>Email Address:</b> " & request.form("txtEmail" & "<br>"
HTML = HTML & "<b>Comments:</b> " & request.form("Contact_Time" & "<br><font></body>"
HTML = HTML & "</html>"
myMail.From = request.form("txtEmail"
myMail.To = " "
myMail.Subject = "Your Subject Here"
myMail.BodyFormat = 0
myMail.MailFormat = 0
myMail.Body = HTML
myMail.Send
Set myMail = Nothing
%>
</font id=code></pre id=code>