Problems with ASP.Net and GMail



Hello Friends

I'm using the follow code in my website to send/receive e-mails:
SmtpClient smtp = new SmtpClient("", 587);

smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.EnableSsl = true;
smtp.UseDefaultCredentials = false;
smtp.Credentials = new
System.Net.NetworkCredential("(e-mail address removed)", "MySecretPassword");

MailMessage message = new MailMessage();
message.Subject = "etc etc etc";
message.Body = "etc etc etc";

message.From = new MailAddress("(e-mail address removed)");
message.To.Add(new MailAddress("(e-mail address removed)")); // ATTENTION HERE


In MailMessage.To, I place myself mail, and works very fine when I
receive feedbacks in the site. But I wish use the same code to send
e-mail to another persons, (like password reminders). The code works
fine, none exceptios are throwed but the mail is not received!!! What's
wrong? Someone can help me?


I have a gmail example in both 1.1 and 2.0 at my blog

just search for "smtp".

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SMTP Authentication problem 4
SmtpClient Problem 4
E-mail and SSL 2
Email problem 3
send email question 9
Email... HELP 1
How to send an email with 2.0? 1
SMTP MailMessage MailAddressCollection 2