By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,652 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,652 IT Pros & Developers. It's quick & easy.

e-mail with VS.C# 2005 Beta 2

P: n/a
First of all does anyone know if the e-mail client in beta 2 works with SSL
and or what I did wrong below? Changing to the correct user name and
password works with outlook.

try
{
System.Net.Mail.MailMessage mm = new
System.Net.Mail.MailMessage("my****@gmail.com", "my****@gmail.com");
mm.Subject = "V2.0 test";
mm.BodyEncoding = Encoding.ASCII;
mm.Body = "Test of the V2.0 e-mail with g-mail";
System.Net.Mail.SmtpClient client = new
System.Net.Mail.SmtpClient("smtp.gmail.com", 587);
client.Credentials = new
System.Net.NetworkCredential("my****@gmail.com", "Password");
client.EnableSsl = true;
client.UseDefaultCredentials = false;
client.Send(mm);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

error message:

---------------------------

---------------------------
The SMTP server requires a secure connection or the client was not
authenticated. The server response was: 5.7.0 Authentication Required
28sm23446wrl
---------------------------
OK
---------------------------
Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Seems I need to add a X509Certificate? Is there a basic one stored on the
computer, I know I never gave outlook one unless it's using its own
internally.

Any suggestions?

Regards,
John
Nov 17 '05 #2

P: n/a
Were you ever able to resolve this issue? I'm having the same problem.

JMH.
Nov 17 '05 #3

P: n/a
No I was not and had to uninstall the beta version for other reasons. I
might be better in the RC version but I can't download it so don't know. My
impression is you have to purchase a certificate that you know the correct
setting for but this is just a guess.

Regards,
John
Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.