navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Help debugging CDONTS script . . . please

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Help debugging CDONTS script . . . please
Page: [1]
 
welcome2

 

Posts: 1
Joined: 11/17/2004
Status: offline

 
Help debugging CDONTS script . . . please - 11/17/2004 6:14:58   
Apologies if this is the wrong place but before i rip all my hair out can anyone help me please.

Very long story (edited) client has website (great) / client moves hosting (no so great) / have to switch to cdonts (hmmm okay) / problems with responses received via cdonts

The problem I believe is that the IT dept of client in their wisdom no longer allow html emails to be received. When the original script was run it simply generated a box [] wherever there was a space and was unreadable.

AFAIAC I have coverted this script to send plain text but I am still getting a small box before the title of the field i.e. []Name:. It doesnt appear on the Subject field just wherever data is passed from form to script.

Please can anyone help me with this. I am newish to ASP/CDONTS but learning by taking everything apart and rebuilding. Your help is very much appreciated.

<%
Response.Buffer = True
Dim strBody
Dim objCDOMail
Dim strMyEmailAddress
Dim strCCEmailAddress
Dim strBCCEmailAddress
Dim strReturnEmailAddress
quantity = Trim(Request.Form("quantity"))

strMyEmailAddress = "me@me.co.uk"
strCCEmailAddress = ""
strBCCEmailAddress = "me@me.co.uk"

strReturnEmailAddress = Request.Form("email")
strBody = "E-mail sent from form on Web Site" &vbCrLF
strBody = strBody &"Name: " & Request.Form("name") &vbCrLF
strBody = strBody &"Address: " & Request.Form("address") &vbCrLF
strBody = strBody &"Telephone: " & Request.Form("phone") &vbCrLF
strBody = strBody &"Quantity required: " & Request.Form("quantity") &vbCrLF
strBody = strBody &"E-mail: " & strReturnEmailAddress &vbCrLF
strBody = strBody &"Enquiry: - " & Replace(Request.Form("message"), vbCrLf, ".")

If Len(strReturnEmailAddress) < 5 OR NOT Instr(1, strReturnEmailAddress, " ") = 0 OR InStr(1, strReturnEmailAddress, "@", 1) < 2 OR InStrRev(strReturnEmailAddress, ".") < InStr(1, strReturnEmailAddress, "@", 1) Then
strReturnEmailAddress = strMyEmailAddress
End If


Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.From = "mywebsite@me.co.uk"
objCDOMail.To = strMyEmailAddress
objCDOMail.Cc = strCCEmailAddress
objCDOMail.Bcc = strBCCEmailAddress
objCDOMail.Subject = "Enquiry sent from enquiry form on website"
objCDOMail.BodyFormat = 1
objCDOMail.MailFormat = 0
objCDOMail.Body = strBody
objCDOMail.Importance = 2
objCDOMail.Send
Set objCDOMail = Nothing

' -- execute confirmation page
Response.Redirect "thanks.html"

%>
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Help debugging CDONTS script . . . please - 11/17/2004 13:11:35   
quote:

objCDOMail.BodyFormat = 1
objCDOMail.MailFormat = 0


Hi and Welcome to OutFront

I believe to signify text-only, both of these will want to be 1:

objCDOMail.BodyFormat = 1
objCDOMail.MailFormat = 1

Does that help any?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to welcome2)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Help debugging CDONTS script . . . please
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts