Solved

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

Posted on 2008-10-29
6
1,251 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
  • 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
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

860 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