SMTP, IIS7 and Windows Server 2008 - iis-7

I'm having trouble setting up SMTP to relay through a 3rd party server.
I'm new to Server 2008 so please bear with me.
I have found the SMTP server in IIS6 which is currently off, but is there one I need to use in IIS7? (IIS7 websites do have the SMTP icon so that 'role' must be installed).
I have used the IIS7 icon to set the remote name and credentials. Using a little test website to send an email to my hotmail account, it comes up saying
Mailbox unavailable. The server response was: 5.7.1 ... we do not relay
or occassionally it says
The remote name could not be resolved: 'The SMTP URL'
I can send using localhost but because that is effectivly spoofing the "from address" loads of them get bounced back!
Anyone got any ideas????

Don't worry, it turns out the people in control of the relay server gave us the wrong username and password, so it would never have worked!
Also, didn't need SMTP server in IIS6 either, so will remove it.

Good to hear you got it sorted. For posterity's sake, if you need to run a SMTP service in IIS7, you need to install the IIS6 "bits" which includes the IIS SMTP service.
One fun gotcha--service gets installed as a manual start for some reason, that was fun to troubleshoot at 3am after the 7th tequila shot.

Related

microsoft azure smtp email relay setup

We are migrating from a dedicated server with a local virtual SMTP server to Windows Azure. As far as I can tell Windows Azure does not allow a local SMTP server to be setup in IIS. The SMTP Server option in the management console is missing. How would I setup an email relay so that I can have a .net web application send emails from a Windows Server 2012 virtual machine in Azure?
This is more like corollary to what #mcollier has stated. Given that you are already on Azure and you get 25,000 free emails (there are higher plans as well) with your subscription as well.
You can configure a Virtual SMTP server which relays to the sendgrid services. For the development perspective you will have the view of using your own SMTP server / service. Setting up a sendgrid based service is explained in this link.
I have used sendgrid earlier and my experience with this was amazing. As #mcollier has pointed out, using services like Sendgrid will give good chance of staying away from spam problem, if you try to setup and use the SMTP service of your own because of the reverse lookup etc.
PS: The above Virtual SMTP Server can be replaced with Amazon SES, which is equivalently a good service. Check out more info here.
First, assuming you're using a Windows Azure IaaS VM. Correct? If so, I think you need to enable that role/feature in Windows Server.
Second, why the need to send emails from that specific server? Would a service like SendGrid work? One problem people sometimes have with email servers in Windows Azure is the domain of your service (something.cloudapp.net) does not match your vanity domain when a reverse DNS lookup is performed. This could cause the email to be flagged as spam (since you don't technically own the sending domain, something.cloudapp.net).
I developed an direct relay application using the normal RFC email commands and lock that on my application, but strange that some test emails get delivered using the relay on windows AZURE VM, and all other mails are not getting any bounce response, and making a sense that every email is being delivering,
This is strange behaviour on azure vm.
so it means you can't send email using azure vm as a smtp mail server, if like to test then simply download promailer marketing manager from jsmtp.com

IIS 7 smtp cant send email

my application needs to send out emails to its users, but somehow I can't make it work. I have installed the SMTP server and in IIS I have set SMTP to use localhost, with port 25 without authentication. But when I try to send email, I am allways getting error
No connection could be made because the target machine actively refused it 127.0.0.1:25
When I choose the option to store email in directory, it works fine, so the problem isn't in my app. Why does this happen? The only thing I am thinking about, is if I need to have port 25 opened or not?
This would happen if you don't have an SMTP server listening on port 25.

Unable to access Active directory from my asp.net application hosted in production server

I have written an asp.net application and validated the logged in user with Active Directory.
It works perfectly in my local machine IDE. But when hosted in my production server, it couldnt communicate with the AD Server.
I have windows authentication enabled in my IIS in server as well has put identity impersonate in my web.config.
The error is get is
Error Trace :System.Runtime.InteropServices.COMException (0x8007054B): The specified
domain either does not exist or could not be contacted.
Any suggestions is appreciated.
That error usually means exactly what it says - that it cannot find a DC to authenticate against for the specified domain. Are you sure the production box can hit the domain via DNS? You can use nslookup if the server is Windows. This will confirm you can actually hit it. You usually see a different error if it's a security/rights issue.
If it is a windows box try using nslookup domain_name and see if any IP addresses are returned. If they aren't, then that's your issue. You may need to manually configure the IP address if that's the case or resolve the potential routing issue if you can't hit it by IP.

How to send Email through ASP.net using localhost

I am creating a banking application in asp.net v 2.0.I need to send confirmation email when a user creates the new account.
I am running the application in localhost.DO I need any special rights to send SMTP email?
provide me a proper way to send email from my application.
Regards
Jeyaganesh
Do you have a SMTP server set up on localhost? Test by using telnet on the server:
telnet 127.0.0.1 25
If the server responds, try sending raw SMTP commands to send an email and trouble-shoot from there.
I find the easiest way with the Microsoft SMTP server is to disable any checks for authentication and rely on relay restrictions, then restrict relaying to 127.0.0.1.
The fact that you're running on localhost shouldn't make any difference.
As long as you have valid email server settings, and it's allowed on the system you are running on, this works just fine.
Did you try it? Did you have a problem?
I think you can sent by gmail smtp server. check this out
http://csharpdotnetfreak.blogspot.com/2009/08/send-email-using-gmail-in-aspnet.html

SMTP email not sent in one server, but sent in another server

I have a section of code that sends email from SMTP server.
The code is carried out webservice & smtp server value is picked up from web.config, while the code hosted on server1 works (send/receive emails), whereas the same code hosted in server2 doesn't send/receive email.
Can you tell your thoughts?
Thanks
This really belongs on ServerFault.com, and there isn't enough information to give you a definitive answer, but I can give you my thoughts on it (as asked).
Most likely, if the SMTP server is a different server than the one your app is hosted on, then probably there is some configuration that needs to be done on the SMTP server. Usually, the SMTP server needs to grant pass-through permissions on a per-user and/or per-server basis. So, most likely your situation is that the SMTP server has an "Allow pass-through" list that includes the server where your code works, and does not include the server where the email is NOT sent.
At least, this is usually the problem in our network...
If the SMTP server is on the same server as your app, of course, you'd want to check to ensure that SMTP is installed on both servers with the same configuration.
If this fails, look for errors... In your app code, or in the event log.. .If my guesses are wrong, you're going to need more info to go on.
Finally, here is a good resource for a coder, not necessarily for an Admin, but it may have info that will help you. http://systemnetmail.com/
first thing to check is the windows firewall and if there is an antivirus or third party firewall installed on the machine.
also check the event log for some useful information about the details of the error.

Resources