SMTP (Simple Mail Transfer Protocol) settings tell Windows applications and clients how to connect to a mail server for sending messages. The core details are the server hostname, port, username, password, and encryption method. These must be correct whether you are configuring Outlook on a desktop or sending transactional email from an ASP.NET website.
For sending email from an email client such as Outlook please review this article for more information. If you are sending email from a website, a website form or need the SMTP server settings for your sites email settings please review this article for further information. Exact hostname and credentials are provided by your hosting account.
#SMTP Settings for Desktop Email Clients
Windows email clients need the outgoing server configured separately from the incoming server. Modern setups require authentication to prevent unauthorized use and TLS encryption to protect credentials and message contents in transit. Using the wrong port or security setting is a leading cause of connection failures.
- SMTP Server: hostname supplied by your provider (commonly in the form mail.yourdomain.com)
- Port: 587 for STARTTLS or 465 for implicit SSL
- Username: your full email address
- Password: matching email account password
- Encryption: TLS on port 587; SSL on port 465
#Configuring Outlook on Windows
Open Outlook, go to File → Account Settings → Account Settings, select the account, and click Change. Enter the SMTP server and port values, check "Require logon", input your credentials, then click More Settings → Outgoing Server tab to enable authentication. On the Advanced tab choose the correct encryption and port. Test by sending a message to yourself.
#Sending Email from ASP.NET Websites
Web applications on Windows servers use the System.Net.Mail namespace. Store settings in code or configuration files so they can be updated without recompiling. Always enable SSL where supported and handle exceptions to capture delivery errors such as authentication failures or relay denials.
using System.Net;
using System.Net.Mail;
public void SendTestEmail()
{
var fromAddress = new MailAddress("you@yourdomain.com", "Your Name");
var toAddress = new MailAddress("recipient@example.com");
var smtp = new SmtpClient
{
Host = "mail.yourdomain.com",
Port = 587,
EnableSsl = true,
DeliveryMethod = SmtpDeliveryMethod.Network,
UseDefaultCredentials = false,
Credentials = new NetworkCredential("you@yourdomain.com", "password")
};
using (var message = new MailMessage(fromAddress, toAddress)
{
Subject = "Test Email",
Body = "This is a test from Windows hosting."
})
{
smtp.Send(message);
}
}
#Common Pitfalls and Troubleshooting
SMTP problems usually surface as exceptions with messages about connection timeouts, authentication failures, or relay access denied. Review Windows Event Logs and your application logs. ISP-level blocks on port 25 are frequent; switching to 587 resolves most desktop client issues.
- Port 25 blocked by ISP or hosting firewall – use 587 with TLS
- Incorrect username format – use the complete email address
- SSL/TLS mismatch – match encryption setting to chosen port
- Sending limits exceeded – check account restrictions before bulk mail
For more assistance please contact our support department.
Test every change with a simple message before relying on it in production. Proper SMTP configuration prevents lost notifications and maintains deliverability for your Windows-hosted applications.
Comments
No comments yet