PDA

View Full Version : Add Body text to Cdonts mail


mattboy_slim
12-30-2002, 08:24 PM
Does anyone know how I can edit the following code to add my own custom text into the body of the email. I experimented a lot with this, but my ASP knowledge lies, I discovered today, in the database area only. The base code was generated by a Dreamweaver extension.

Any help is appreiciated.

Thanks,
Matt


<%
if Request.Form("FFSubmitted") = "yes" then
Dim BodyString
Dim ExcludeFields
Dim objCDO
Dim RedirectURL
Set objCDO = Server.CreateObject("CDONTS.NewMail")
ExcludeFields = "addOver" & "wordsOver" & "amount" & "words" & "submit" & "FFSubmitted"
objCDO.From = "REQUEST: Classified"
objCDO.To = "***@****.com"
objCDO.Cc = ""
objCDO.Bcc = ""
objCDO.Subject = "Classified Ad Request"
BodyString = Replace("","~",chr(13) & chr(10) )& chr(13)
For Each item In Request.Form
If InStr(1,ExcludeFields,item,1) = 0 then
BodyString = BodyString & item & ": " & Request.Form(item) & chr(13)
End If
Next
objCDO.Body = BodyString
objCDO.BodyFormat = 1
objCDO.MailFormat = 1
objCDO.Send
Set objCDO = Nothing
RedirectURL = "thanks.asp"
If RedirectURL <> "" then
If Request.QueryString <> "" Then
response.redirect(RedirectURL & "?" & Request.QueryString)
else
response.redirect(RedirectURL)
end If
end if
end if
%>

mattboy_slim
12-30-2002, 09:51 PM
Problem solved. New issue arised.

Please see new post.

whammy
12-30-2002, 11:52 PM
Glad you got it taken care of. :)

I'll go ahead and close this post to avoid confusion, you should be able to use my solution in the other post as well, since it's already pretty much implemented in your form. :D