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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
I found the answer, in IIS7, under the SMTP for the website, I needed to use Authentication / Windows.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.