943,201 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 1646
  • ASP RSS
Jun 17th, 2010
0

How to send mail from the localhost using Gmail account?

Expand Post »
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
ASP Syntax (Toggle Plain Text)
  1. <p>Password Reminder</p>
  2. <form method="post" action="re_pass_process.asp">
  3. <input type="text" name="email">
  4. <input type="submit" value="Send">
  5. </form>
re_pass_process.asp
ASP Syntax (Toggle Plain Text)
  1. <!--#include file="connection.asp"-->
  2. <%
  3. openConn()
  4. email = request("email")
  5. response.Write(email)
  6. ''response.End()
  7. if trim(email) <> "" then
  8.  
  9. sql= "select password from candidate where email = '" & replace(email,"'","''") & "'"
  10. ''response.Write(sql)
  11. ''response.End()
  12. set rs = createobject("adodb.recordset")
  13. rs.open sql,conn
  14. ''response.End()
  15. if not rs.eof then
  16. set msg = createobject("CDO.Message")
  17. msg.to = email
  18. ''response.Write(email)
  19. msg.from = "tranlinh.nmt@gmail.com"
  20. msg.subject = "123456" ' pass for mail:tranlinh.nmt@gmail.com
  21.  
  22. msg.TextBody = "Hello. Your password is " & rs("password")
  23. response.Write rs("password")
  24. ''response.End()
  25. msg.Send
  26. response.End()
  27. end if
  28. rs.close
  29. end if
  30. %>
As above, what need to be installed to send an email?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
thebluestar is offline Offline
55 posts
since Apr 2009
Jun 24th, 2010
0
Re: How to send mail from the localhost using Gmail account?
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?
Reputation Points: 5
Solved Threads: 14
Junior Poster
ArtistScope is offline Offline
146 posts
since Jun 2010
Aug 14th, 2010
0
Re: How to send mail from the localhost using Gmail account?
Reputation Points: 10
Solved Threads: 3
Light Poster
arunss is offline Offline
30 posts
since Dec 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: how to connect to xml pages through asp.net pages
Next Thread in ASP Forum Timeline: VBScript, loading xml object from a string





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC