Solved

how can i configure asp.net 3.5 to use a hotmail account for sending mails

Posted on 2009-05-13
6
482 Views
Last Modified: 2013-11-30
i want to configure my web.config that i can send email though a hotmail acount.
I get the following error message:
[SmtpException: Für den SMTP-Server ist eine sichere Verbindung erforderlich, oder der Client wurde nicht authentifiziert. Die Serverantwort war: 5.7.0 Must issue a STARTTLS command first]
which means: a secure connection is required for SMTP-Server

there is no feature to select secure connection in WEB/ASP.NET-Configuration
0
Comment
[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
  • 3
  • 3
6 Comments
 
LVL 10

Expert Comment

by:MaxOvrdrv2
ID: 24374992
this should help you out... it tells you exactly how to do what you need to do:

http://www.developerfusion.com/code/2453/send-receive-emails-using-winsock-and-pop3/
0
 

Author Comment

by:ernst.kugler@gmail.com
ID: 24376062
I know, how to send mail programmaticly.

I look for a way to modify the web.config that I can send with the web.config settings.

Is there a seeting for the <mailSettings> node for ssl specification and the port?
0
 
LVL 10

Expert Comment

by:MaxOvrdrv2
ID: 24376164
why don't you just use a key for each then... and then call that using the AppSettings("keyname")... that way your addresses and ports are all in the web config and you just call them in the code... make a change of address in the key in the web config and they all use the new ports and addresses.
0
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 

Author Comment

by:ernst.kugler@gmail.com
ID: 24376249
I do not understand..
0
 

Author Comment

by:ernst.kugler@gmail.com
ID: 24433155
where can I find detailled information about the mail part of the webconfig file?
0
 
LVL 10

Accepted Solution

by:
MaxOvrdrv2 earned 250 total points
ID: 24433456
here is how you access the webconfig mailsettings programatically:
Dim webConfigFile As System.Configuration.Configuration = WebConfigurationManager.OpenWebConfiguration("~/web.config")4            
 
Dim mailSettings As MailSettingsSectionGroup = webConfigFile.GetSectionGroup("system.net/mailSettings")

Open in new window

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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