ASP.NET Send SMTP E-mail - No password in Web.Config

I'm using ASP.NET 2.0, VB code to send an e-mail to several addresses.  The e-mail is coming from whatever e-mail address the online user specifies in the txtEmail texbox.  Its goes to one of 3 e-mail addresses based on a radio button choice.  I'm using System.Net.Mail, but it wants the SMTP relay server info in the web.config file like:

<system.net>
    <mailSettings>
      <smtp>
        <network
             host="relayServerHostname"
             port="25"
             userName="username"
             password="password" />
      </smtp>
    </mailSettings>
  </system.net>

I don't want all this information to be online in the web.config file.  If someone gets into the system, they have access to it.  Specifically how can I do this so I don't a user/password to send e-mail?  Please help.
redmissionAsked:
Who is Participating?
 
David RobitailleConnect With a Mentor Analyst ProgrammerCommented:
yes, but it up to the SMTP server settings.
As an exemple, my SMTP server dont ask a for user/password for id adress in the local network.
0
 
David RobitailleAnalyst ProgrammerCommented:
0
 
redmissionAuthor Commented:
That works, but is there any way I can make this anonymous so there is no need to even have the username, password?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
David RobitailleAnalyst ProgrammerCommented:
id adress = ip adress
0
 
David RobitailleAnalyst ProgrammerCommented:
did that answer your question?
0
 
redmissionAuthor Commented:
Thanks!  We also used 127.0.0.1 as the name of the database server to help make things more secure.
0
All Courses

From novice to tech pro — start learning today.