Solved

How do I setup IIS 7 to send email

Posted on 2011-02-15
4
561 Views
Last Modified: 2012-05-11
I'm developing a asp.net MVC app that sends email for user registration, but I can't get IIS to send email. When I tested my code, it returns a "failure sending email". Here is what I have done so far
1. Installed SMTP tool in IIS 7 and make sure the service is running.
2. Created a test email and put it in inetpub\mailroot\pickup and the mail is sent and received fine.
3. I'm not sure what settings I should use in IIS. Should I use "localhost" as the smtp server and port 25? Under what circumstance do I have to use authentication?

0
Comment
Question by:ffayyca1
  • 2
4 Comments
 
LVL 3

Expert Comment

by:QuinnDester
ID: 34902040
IIS7 needs extra parameters to be declared before it will work.. these following are what you need to declare in your code that were not needed in IIS6 these are in ASP Classic

objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="localhost"

'Server port
objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
objMail.Configuration.Fields.Update
0
 
LVL 9

Expert Comment

by:shalabhsharma
ID: 34903317
Installed the IIS6 management compatibility from Roles and then go to administrative tools, IIS6 manager and configure SMTP server.

.

0
 
LVL 1

Accepted Solution

by:
ffayyca1 earned 0 total points
ID: 34908244
I fixed my problem by specifying smtp to use localpickupdirectory and it works.
0
 
LVL 1

Author Closing Comment

by:ffayyca1
ID: 34941325
Found out solution on my own.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now