Solved

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

Posted on 2008-10-29
6
1,259 Views
Last Modified: 2012-05-05
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.
0
Comment
Question by:redmission
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 18

Expert Comment

by:David Robitaille
ID: 22833480
0
 

Author Comment

by:redmission
ID: 22834375
That works, but is there any way I can make this anonymous so there is no need to even have the username, password?
0
 
LVL 18

Accepted Solution

by:
David Robitaille earned 500 total points
ID: 22834402
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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 18

Expert Comment

by:David Robitaille
ID: 22834418
id adress = ip adress
0
 
LVL 18

Expert Comment

by:David Robitaille
ID: 22853383
did that answer your question?
0
 

Author Closing Comment

by:redmission
ID: 31514688
Thanks!  We also used 127.0.0.1 as the name of the database server to help make things more secure.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

634 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question