Gmail smtp settings
smtp.gmail.com (use authentication) |
Use Authentication: Yes |
Port for TLS/STARTTLS: 587 |
Port for SSL: 465 |
Use the above settings for SMTP Client Class properties
If you're having any trouble sending mail but you've confirmed that encryption is active for SMTP in your mail client, try to configure your SMTP server on a different port (465 or 587)
If you enable SSL use 465 or else use 587 (default)
Inline Code
Here is working C# Code
Source :Gmail SMTP http://support.google.com/mail/bin/answer.py?hl=en&answer=13287
No comments:
Post a Comment