i have been trying to set something up where i can send the url in an email using cdonts, i wrote this script as a test and it worked, but is it safe? <%
email web page using cdonts
2
i have been trying to set something up where i can send the url in an email using cdonts, i wrote this script as a test and it worked, but is it safe?
<%
dim send
send = request("send")
If send = "yes" then
Set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.Open "GET", "somewebsite", false
objHTTP.Send
'Response.Write objHTTP.ResponseText
'send mail
Dim strHTML
strHTML = "<html><head><title>" & request.servervariables("server_name") & "</title></head>"
strHTML = strHTML & objHTTP.ResponseText
strHTML = strHTML & "<a href=""somewebpage"">Remove Me</a>"
strHTML = strHTML & "</body></html>"
'Set up the email object
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
With objMail
.from = "from_email"
.To = "to_email"
.Subject = "Web Development"
.BodyFormat = 0 'CdoBodyFormatHTML
.MailFormat = 0 'CdoMailFormatMime
.Body = strHTML
.Send
End With
Set objMail = Nothing
Response.write "<a href=""cdonts.asp"">Sent</a>"
else
response.write "<a href=""cdonts.asp?send=yes"">Send Mail</a>"
end if
%>
<%
dim send
send = request("send")
If send = "yes" then
Set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.Open "GET", "somewebsite", false
objHTTP.Send
'Response.Write objHTTP.ResponseText
'send mail
Dim strHTML
strHTML = "<html><head><title>" & request.servervariables("server_name") & "</title></head>"
strHTML = strHTML & objHTTP.ResponseText
strHTML = strHTML & "<a href=""somewebpage"">Remove Me</a>"
strHTML = strHTML & "</body></html>"
'Set up the email object
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
With objMail
.from = "from_email"
.To = "to_email"
.Subject = "Web Development"
.BodyFormat = 0 'CdoBodyFormatHTML
.MailFormat = 0 'CdoMailFormatMime
.Body = strHTML
.Send
End With
Set objMail = Nothing
Response.write "<a href=""cdonts.asp"">Sent</a>"
else
response.write "<a href=""cdonts.asp?send=yes"">Send Mail</a>"
end if
%>
- Adaptive
Next Topics on Trending Feed
-
2