[Mono-list] Testing SmtpSend

Dwivedi , Ajay Kumar AjayKumar.Dwivedi@dresdner-bank.com
Tue, 11 Jun 2002 08:57:25 +0100


First Things first:
	You can use "using" directive only on namespaces and not individual
classes.
So, the second line should read: 
using System.Web.Mail;

In any case, IMO the Mail classes are not complete. So you won't be able to 
run them with mono.

Cheers,
Ajay

> -----Original Message-----
> From: [A]ndy80 - Andrea "Grandi [mailto:andy80@ptlug.org]
> Sent: Tuesday, June 11, 2002 12:56 PM
> To: mono-list@ximian.com
> Subject: [Mono-list] Testing SmtpSend
> 
> 
> Hello
> 
> I'm a new mono user. I'm doing some tests with mono. In particular I'm
> trying to use SmtpSend.
> 
> When I try to compile this code:
> 
> using System;
> using System.Web.Mail.SmtpMail;
> 
> public class AG_SendMail
> {
> 	public static void Main()
> 	{
> 		string from = "andy80@ptlug.org";
> 		string to = "andy80@ptlug.org";
> 		string subject = "E-mail inviata da C#";
> 		string body = "<html><body>E-mail inviata da C# - con
> successo</body></html>";
> 		SmtpMail.Send(from, to, subject, body);
> 	}
> }