Solved

How do I setup IIS 7 to send email

Posted on 2011-02-15
4
565 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
[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
  • 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) (http://technet.microsoft.com/en-us/library/cc758834(WS.10).aspx) is a much better solution when you need to p…
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…
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…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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