Solved

How do I setup IIS 7 to send email

Posted on 2011-02-15
4
564 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

830 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