email - Issue with SMTP relay in .NET -


Maybe it is more than an IIS question compared to programming, but I will still get it out there.

I am trying to send an email via SMTP with C # using the following test code:

  // params: email, topic by email , Body Melmessage M = New MailMessage (& lt; Sendemail & gt;, & lt; receiveemail & gt ;, "testubject", "testby"); SmtpClient c = New SmtpClient (& lt; SMTP Server & gt;); C. Sand (m);  

Extremely simple I am completely avoid credentials due to the configuration on my SMTP server:

This connects me without credentials Allow Alternatively I have tried an empty string for the username / password, and the default credentials.

When I send an attempt to send, I get an error in sending "SMTP email to get the error: Mailbox unavailable. Server response was: 5.7.1" Relay for error hopeless at. I go to the relay section of IIS, and it is as follows:

So my idea is, "Allow all computers, successfully authenticated in relay" option is enabled , Because I allow unknown authentication, my application is not capable of relay. Is this the case? If so, how do I fix my code to be able to relay? I have tried to get messages in and out of emails in the domain, there is no benefit. This is a Server 2003 machine.

Your assessment is correct.

You can either use a certified connection, or add all other IP / domains, which will run in your code relay exception list.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -