[Mono-list] Smtp Trouble

John Osborne j-osborne@northwestern.edu
Fri, 06 May 2005 10:24:11 -0500


I'm running into trouble with the following mini-test program:

using System;
using System.Web;
using System.Web.Mail;

public class SmtpTest {

    public static void Main (String[] args) {
        SmtpMail.SmtpServer = "foo.northwestern.edu";
        SmtpMail.Send 
("j-osborne@northwestern.edu","j-osborne@northwestern.edu","Hello, 
E-Mail world!","This is a test mail.");
    }
}


because I get the following compilation errors:
SmtpTest.cs(3) error CS0234: The type or namespace name `Mail' could not 
be found in namespace `System.Web'
SmtpTest.cs(3) error CS0234: The type or namespace name `Mail' could not 
be found in namespace `System.Web'
SmtpTest.cs(3) error CS0246: The namespace `System.Web.Mail' can not be 
found (missing assembly reference?)

Two questions:
1) I'm running mono on the Mac, did the System.Web.Mail namespace never 
get ported to the Mac and hence the compilation errors?
2) How do I authenicate against the SMTP server with a password? It 
looks like on .NET there are some extra fields you can add but this 
doesn't appear to be the case on mono.

 -John

-- 
John Osborne
Senior Bioinformatics Analyst
Robert H. Lurie Cancer Center
Northwestern University
676 N. St. Clair Street, Suite 1216C
Chicago, Illinois 60611
j-osborne@northwestern.edu