web.config mailSettings

I am getting this error when sending mail from both my local host and web server:

Syntax error in parameters or arguments. The server response was: 5.7.1 <support@xxx.net>... Permission Denied
On the client.send:
                    Dim client As New SmtpClient()

the from and to addresses are valid.

This is what I have in my web.config:

            <smtp deliveryMethod="Network" from="support@xxx.net">
                <network host="mail.xxx.net" port="25" userName="xxx" password="xxx"/>

I have also tried the host as the actual IP address for the mail server too.

I do have a firewall. the mail server is setup in the firewall and is very actively in use, but from another web server with asp classic pages.

I have a netgear firewall.
So there are 3 servers, web server 2000 which sends mail fine, web server2008 which is new and hasn't yet sent mail, and mail server.

What am I lacking?

I don't know what deliveryMethod I should use. Saw it in an example.


Starr DuskkASP.NET VB.NET DeveloperAsked:
Who is Participating?
Starr DuskkConnect With a Mentor ASP.NET VB.NET DeveloperAuthor Commented:
I found the answer, in IIS7, under the SMTP for the website, I needed to use Authentication / Windows.
btumerConnect With a Mentor Commented:
Check to see if the mail server allows relay from the IP of your web server.
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
Yes, the mailserver does.
However, I should be able to send from localhost too and that is not on a webserver.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.