Guest User

Untitled

a guest
Aug 25th, 2018
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Sending Email Problem : Connection refused
  2. <system.net>
  3. <mailSettings>
  4. <smtp>
  5. <network
  6. host="localhost"
  7. port="25"
  8. defaultCredentials="true"
  9. />
  10. </smtp>
  11. </mailSettings>
  12. </system.net>
  13.  
  14. <system.net>
  15. <mailSettings>
  16. <smtp from="yourMailId@gmail.com ">
  17. <network host="smtp.gmail.com" defaultCredentials="false"
  18. port="587" userName ="yourMailId@gmail.com" password="yourMailPassword" />
  19. </smtp>
  20. </mailSettings>
  21. </system.net>
  22.  
  23. SmtpClient client = new SmtpClient();
  24. client.EnableSsl = true;
Add Comment
Please, Sign In to add comment