0

I wonder if I can send an email via smtp using Gmail account without installing a mail server or not?
For example:
re_pass.asp

<p>Password Reminder</p>
<form method="post" action="re_pass_process.asp">
	<input type="text" name="email">
	<input type="submit" value="Send">
</form>

re_pass_process.asp

<!--#include file="connection.asp"-->
<%
openConn()
email = request("email")
response.Write(email)
''response.End()
if trim(email) <> "" then

	sql= "select password from candidate where email = '" & replace(email,"'","''") & "'"
	''response.Write(sql)
	''response.End()
	set rs = createobject("adodb.recordset")
	rs.open sql,conn
	''response.End()
	if not rs.eof then
		set msg = createobject("CDO.Message")		
		msg.to = email
		''response.Write(email)
		msg.from = "tranlinh.nmt@gmail.com"		
		msg.subject = "123456" ' pass for mail:tranlinh.nmt@gmail.com
		
		msg.TextBody = "Hello. Your password is " & rs("password")
		response.Write rs("password")
		''response.End()
		msg.Send
		response.End()
	end if
	rs.close
end if
%>

As above, what need to be installed to send an email?

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by arunss
0

If you are sending this from a Windows server then you will have either CDONTS or CDOSYS support anyway. In which case you can use "localhost" as your mail server or nominate one which will allow you to relay.

Is that what you are trying to do, by using gMail as the mail server or are you just trying to send email to your own account at gMail?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.