Problems with ASP.Net and GMail

C

ClickList

Hello Friends

I'm using the follow code in my website to send/receive e-mails:
SmtpClient smtp = new SmtpClient("smtp.gmail.com", 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

smtp.Send(message);

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?
 
S

sloan

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

spaces.msn.com/sholliday/

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


Members online

Forum statistics

Threads
473,836
Messages
2,569,750
Members
45,545
Latest member
rapter____0

Latest Threads

Top