ASP.NET problem sending emails with custom to address
hi,
I'm in the process of creating my own ASP.NET mailing list. I'm using the following code to send emails:
public static void Send(string to, string from, string subject, string message)
{
MailMessage email = new MailMessage(to, from, subject, message);
email.IsBodyHtml = true;
(new SmtpClient()).Send(email);
}
The problem is is that an exception gets thrown if I send an email to an address that hasn't already been setup in the eukhost control panel. PLEASE don't tell me that I will have to individually create a different account per recepitent in the database?!
I'm assuming I have in someway not configured the above code correctly?
|