Solved

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

Posted on 2008-10-29
6
1,253 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

738 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