Hi,
I try to send a mail using System.Web.Mail.SmtpMail via the local (virtual)
SMTP server like this:
System.Net.Mail.SmtpClient smtpClient = new
System.Net.Mail.SmtpClient("localhost");
smtpClient.Credentials =
System.Net.CredentialCache.DefaultNetworkCredentials;
smtpClient.Send("test@gmx.de", "test@gmx.de", "Test", "This is as test"); //
Exception
"test@gmx.de" is an existing E-Mail-Address.
Send throws the error "Unable to relay for test@gmx.de"!???
Using the old style SmtpMail class the mail is sent without exception:
System.Web.Mail.SmtpMail.SmtpServer = "";
System.Web.Mail.SmtpMail.Send("test@gmx.de", "test@gmx.de", "Test", "This is
as test"); // OK
Does anyone know the source of this error?