Relay Error in Send Mail in 2.0

R

rose

Hi everyone,

I am trying to send mail to external domains like gmail,hotmail via my
local network exchange server. The code works in .net 1.1 with the
User name and password [user created with full rights on the Exchange
server] provided by the Network admin to me.

Although, I still couldnt figure out the fact that if I send emails to
external domain through outlook which is configured to the same
exchange server, there isnt any problem. But when I did that through
my code, it threw our very own 550 5.7.1 relay error. Thankfully, the
problem in .net 1.1 is solved.

Now, using the same credentials, I want to send the mails through 2.0
but I get the same error.i have tried all the solutions I could find
on the net but in vain. With local host it doesnt throw an error but
the mail ends up in Badmail. Besides I want to use exchange server but
that too isnt working. There isnt any firewall issue. If there was,
then the mail in 1.1 shouldnt be working on the same machine using
same parameters and it doesnt have SSL authentication.

SmtpClient client = new SmtpClient();
client.Host = "localhost"; //If i specify my exchange
server here, it throws an error
client.Port = 25;
client.Credentials = new
System.Net.NetworkCredential("username", "pass");

I really cant understand what the problem is so please any help will
be highly appreciated :)
Thanks
 

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

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top