Recipient address rejected: Access denied

C

Coder

Hello,

I m developing a web application and my site is placed on a hosting company.

The problem is, When I try to run this code, This error code returns.

"Recipient Address Rejected: Access Denied"

I can send via outlook using below smtp server address, but by c# code,
above error returns.....

My Code Part is :


// Mailing

string from = "(e-mail address removed)";


string to = "(e-mail address removed)";


string subject = "Subject Of";


string body = "Deneme";


SmtpMail.SmtpServer = "smtp.mydomain.com";


SmtpMail.Send(from, to, subject, body);

// Mailing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top