[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How do I setup IIS 7 to send email

Posted on 2011-02-15
4
Medium Priority
?
570 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

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

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

Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
Loops Section Overview
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

834 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