ooiooipig
04-14-2003, 08:22 AM
Hi all, can anyone here help me with my problem??
I'm writing an asp code to send email to the administrator when the user has submitted the form. It goes on well except there's one error. When the user enter something like this in the ReqTitle field: "Please do not use your friend's password", it is reflected in the email as "Please do not use your friend' 's password"
It shows TWO single quotation inside the email instead the original one which is single quotation. Can anyone please advise me on how to get rid of the extra quotation??
thanks!!
ps: before it is submitted into the database, it is being trimmed and replace as this: vreqTitle = replace(trim(Request("vreqTitle")),"'","''")
so that it can be entered into the database without any error.
my code is as shown below:
Set Mailobj = Server.CreateObject("CDONTS.NewMail")
Mailobj.From = "ConBiz IS Request (" & vReqtrEmail & ")"
Mailobj.To = vApprovEmail
Mailobj.Bcc = "wenxiang@singtel.com"
Mailobj.Subject = "New IS Request for Approval"
Mailobj.Body = "Hi " & vApprovOfficer & "!" & vbCrLf & vbCrLf & _
"Request Type: " & ReqDesc & "" & vbCrLf & _
"Application Name: " & vAppnId & "" & vbCrLf & _
"Request No: " & ReqNo & "" & vbCrLf & _
"Request Title: " & vreqTitle & "" & vbCrLf & _
"Requestor: " & vReqtr & "" & vbCrLf & vbCrLf & vbCrLf &_
"Please click on the embedded hyperlink below to endorse the request." & vbCrLf & _
"http://sg_05_webdev:87/default.asp" & vbCrLf
Mailobj.Send
Set Mailobj = Nothing
I'm writing an asp code to send email to the administrator when the user has submitted the form. It goes on well except there's one error. When the user enter something like this in the ReqTitle field: "Please do not use your friend's password", it is reflected in the email as "Please do not use your friend' 's password"
It shows TWO single quotation inside the email instead the original one which is single quotation. Can anyone please advise me on how to get rid of the extra quotation??
thanks!!
ps: before it is submitted into the database, it is being trimmed and replace as this: vreqTitle = replace(trim(Request("vreqTitle")),"'","''")
so that it can be entered into the database without any error.
my code is as shown below:
Set Mailobj = Server.CreateObject("CDONTS.NewMail")
Mailobj.From = "ConBiz IS Request (" & vReqtrEmail & ")"
Mailobj.To = vApprovEmail
Mailobj.Bcc = "wenxiang@singtel.com"
Mailobj.Subject = "New IS Request for Approval"
Mailobj.Body = "Hi " & vApprovOfficer & "!" & vbCrLf & vbCrLf & _
"Request Type: " & ReqDesc & "" & vbCrLf & _
"Application Name: " & vAppnId & "" & vbCrLf & _
"Request No: " & ReqNo & "" & vbCrLf & _
"Request Title: " & vreqTitle & "" & vbCrLf & _
"Requestor: " & vReqtr & "" & vbCrLf & vbCrLf & vbCrLf &_
"Please click on the embedded hyperlink below to endorse the request." & vbCrLf & _
"http://sg_05_webdev:87/default.asp" & vbCrLf
Mailobj.Send
Set Mailobj = Nothing