Configuring ELMAH to send emails without putting your password in the config file
来源:互联网 发布:vb 字符串函数 编辑:程序博客网 时间:2024/05/07 08:33
http://blog.dantup.com/2011/05/configuring-elmah-to-send-emails-without-putting-your-password-in-the-config-file/
Today I was configuring ELMAH to send emails when an exception occurs on my new blog. While looking for the config options, I noticed that a lot of the snippets being posted around suggests people are putting usernames and passwords in their config files to make this work. That's pretty scary! :(
Because SMTP is a bit crap, you don't actually need to authenticate to send email. Most SMTP servers are locked down to stop relaying, but if you deliver directly to the recipients server, the mail will (usually) be accepted anonymously. I sayusually because your email could be rejected based on the From header if something like DomainKeys is set up for that domain.
To configure ELMAH to send mail without authentication, simply look up an MX record for the domain you wish to send the email to, and use that as the SMTP Server. Eg., if you're using Google Apps (like me), you could do something like this:
<errorMailfrom=""Blog Error;quot; <blog+errors@fakedomain.com>"to=""Blog Errors" <blog+errors@fakedomain.com>"smtpServer="aspmx.l.google.com" />
This means you don't need to put your email username/password in the config file to receive emails about your exceptions.
- Configuring ELMAH to send emails without putting your password in the config file
- How to reset your password in Ubuntu
- register controls in your web.config file
- 4 ways to send a PDF file to the IE Client in ASP.NET 2.0
- 4 ways to send a PDF file to the IE Client in ASP.NET 2.0
- Where is the best place to store a password in your Android app
- Putting Spark to Use: Fast In-Memory Computing for Your Big Data Applications
- 35.You executed the command to create a password file in the database server:
- Using VBScript to Send Emails with Gmail
- nrf51822 secure DFU by OTA: How to Set Password in the DFU zip File
- 126.Identify the two situations in which you use the alert log file in your database to check the de
- config the Cache in the file of Web.Config
- Putting the EDA in SOA @ JDJ
- Sign APK without putting keystore info in build.gradle
- Putting The One Minute Manager to Work
- How to solve the problem witch is the system send many emails when cron have something wrong
- [转!]How to reset your password in Ubuntu
- Please change the value of 'Security.salt' in app/config/core.php to a salt value specific to your a
- Android:创建可穿戴应用 - 建立模拟器和创建项目
- hibernate使用group by,having实现统计功能
- javascript学习一
- C#与数据库的连接
- POJ2485——Highways(最小生成树)
- Configuring ELMAH to send emails without putting your password in the config file
- 小金金的博客起航
- c++类的指针定义
- filegroup reference and partitioning scheme' is not supported in this version of sql server.
- 上一级下一级
- 构造函数、析构函数和函数的重载
- android监听安装广播需要注意几点
- javascript学习二
- 模拟Servlet运行方法