[Mono-bugs] [Bug 637205] New: System.Net.Mail.Credentials is giving an error on compile
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Sep 5 02:57:16 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=637205
https://bugzilla.novell.com/show_bug.cgi?id=637205#c0
Summary: System.Net.Mail.Credentials is giving an error on
compile
Classification: Mono
Product: MonoTouch
Version: unspecified
Platform: Macintosh
OS/Version: Mac OS X 10.6
Status: NEW
Severity: Major
Priority: P5 - None
Component: Class Libraries
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: james.bentley at live.com
QAContact: mono-bugs at lists.ximian.com
Found By: Development
Blocker: ---
Description of Problem:
System.Net.Mail.Credentials is giving an error on compile -
When the line below is compiled,
smtpServer.Credentials = new NetworkCredential("help at greenpercussion.com",
"pass0123");
it get the error: Cannot implicitly convert type System.Net.NetworkCredential
to System.Net.IcredentialsByHost. An explicit conversion exists (are you
missing a cast?)
Steps to reproduce the problem:
1. Run the sample code i provide below in a blank project
2. See the Debugger error on compile
Actual Results:
Expected Results:
How often does this happen?
Every time
Additional Information:
Test code is as follows:
using system.net.mail;
submitButton.TouchUpInside += delegate {
string to = "help at greenpercussion.com";
string from = "help at greenpercussion.com";
string subject = "Using the new SMTP client.";
string body = @"Hello World";
MailMessage message = new MailMessage(from, to, subject, body);
SmtpClient smtpServer = new SmtpClient("mail.greenpercussion.com");
smtpServer.Port = 25;
smtpServer.Credentials = new
NetworkCredential("help at greenpercussion.com", "pass0123");
try {
smtpServer.Send(message);
}
catch (Exception ex) {
Console.WriteLine("Exception caught in CreateTestMessage1():
{0}",
ex.ToString() );
}
};
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list