Showing posts with label Google. Show all posts
Showing posts with label Google. Show all posts
2009/09/10
Google Search S-U-P-E-R-sized - how to make it normal again
If you don't like the latest Google Search modification (larger search box features + larger suggestion text), here's a Google Search - un-S-U-P-E-R-sized Greasemonkey script.
2007/04/25
Sending mail using System.Net.Mail.SmtpClient and Gmail
This code snippet:
It is crucial to remember to:
MailMessage message = new MailMessage(); message.From = new MailAddress("somebody@gmail.com"); message.To.Add(new MailAddress("somebody-else@some.server.com")); message.Subject = "testing..."; message.Body = "This is a test."; SmtpClient smtp = new SmtpClient(); smtp.EnableSsl = true; smtp.Send(message);along with this app.config file:
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.net> <mailSettings> <smtp> <network host="smtp.gmail.com" port="587" userName="somebody@gmail.com" password="some-password" defaultCredentials="false" /> </smtp> </mailSettings> </system.net> </configuration>allows to send e-mail from .NET code using Gmail as an SMTP server.
It is crucial to remember to:
- set EnableSsl to true;
- use port 587 (not 465, clicky).
Subscribe to:
Posts (Atom)