Send mail i 2.0
Hej jeg har et lille problem med at sende mail i 2.0 fra min console appKode er fra msdn'en
Kode:
MailAddress to = new MailAddress("min@mail.dk");
MailAddress from = new MailAddress("min@mail.dk");
MailMessage message = new MailMessage(from, to);
message.Subject = "Using the new SMTP client.";
message.Body = @"Using this new feature, you can send an e-mail message from an application very easily.";
SmtpClient client = new SmtpClient("min.relay.server.dk");
client.Send(message);
Fejl:
System.Net.Mail.SmtpFailedRecipientException: Mailbox name not allowed. The serv
er response was: sorry, that domain isn't in my list of allowed rcpthosts (#5.7.
1)
at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressColl
ection recipients, String deliveryNotify, SmtpFailedRecipientException& exceptio
n)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
og der skulle være åben for min ip oppe på relay serven
