IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact

How to Fix SMTP 550 5.7.1 Unable to Relay Error on Windows Server 2012 R2

Here is one way of fixing an SMTP error on Windows Server 2012 when you see an error message similar to the one below:

Error Message

System.Exception: SMTP error sending: Client Service Setup Error on SERVERNAME ---> System.Web.HttpException: The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for [email protected]    ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to  relay for [email protected]       --- End of inner exception stack trace ---     at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)      at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)     at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object  obj, String methodName, Object[] args)     --- End of inner exception stack trace ---     at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)     at System.Web.Mail.SmtpMail.CdoSysHelper.Send(MailMessage  message)     at System.Web.Mail.SmtpMail.Send(MailMessage message)     at ClientServiceSetup.CommonFunctions.SendMail(MailMessage objMail)     --- End of inner exception stack trace ---

Steps to Add Localhost to the SMTP Relay

  1. Launch IIS 6.0 Manager.

    IIS 6 Manager on Windows Server 2012 R2

  2. Right-click on the STMP Server (on this example it’s named default, but it could be named something else) and select Properties.

    IIS 6 Manager SMTP Properties on Windows Server 2012 R2

  3. Click on the Access tab and at the very bottom under Relay restrictions, click on Relay button.

    IIS 6 Manager SMTP Properties Access Relay Windows Server 2012 R2

  4. Select Only the list below, click on Add… button and under Single computer and IP Address, type in 127.0.0.1 and click OK.

  5. Check Allow all computers which successfully authenticate to relay, regardless of the list above. and click OK, and OK one more time to get out the Properties window.

    IIS 6 Manager SMTP Grant Access Relay on Windows Server 2012 R2

  6. Re-test and that should be it.

Further Reading

IIS SMTP – The server response was: 5.7.1 Unable to relay for outgoing address, Still not working
How to Install SMTP Server on Windows Server 2012 R2

September 26, 2018 Filed Under: How To Tagged With: IIS, Internet Information Services, Microsoft, Simple Mail Transfer Protocol, Smtp Server, Windows Server

How to Install IIS on Windows 10

Although IIS is included in every installation of Windows 10, it’s not turned on by default. Here’s a way to install IIS on Windows 10.

  1. Right-click on the Windows button on the bottom-left corner and select Run

    Windows Run

  2. In the Run dialog box, type appwiz.cpl and press ENTER.

    Windows run appwiz.cpl

  3. As soon as a new window called Programs and Features is opened, click on the link Turn Windows features on or off.

    Windows Programs and Features

  4. Click on the Internet Information Services checkbox. By default it will install all you need to host a website. However you might want to check some other components that you might need as well. Once done, click OK and Close when it says “Windows completed the requested changes.”

    IIS Windows Features

  5. Now open your browser and type in localhost and press ENTER. You should see a default web page is rendered in your browser.

    IIS Default Page

That’s all there is to it and the default website directory will be in C:\Inetpub\wwwroot folder.

Further Reading

How to Manage IIS Remotely
How to Manage IIS Servers Remotely with WMSVC
How to Backup IIS Manager Connections List on Windows
How to Install IIS Management Console on Windows
How to Migrate IIS Websites to a Different Server
New Features Introduced in IIS 10.0
How to Setup HTTP Strict Transport Security (HSTS) on IIS
How to Activate Built-in Web Server

May 31, 2018 Filed Under: How To Tagged With: IIS, Internet Information Services, Microsoft, Windows

How to Setup Visual Studio Code for Hugo Static Site Generator

Based on a few questions on how to setup an environment to edit content using Hugo, here’s a few simple steps to follow if you want a quick and easy way to do it. Keep in mind, the beauty of using Hugo is that you are free to use any text editor you like.

This is not the only way to do it but this will get you there fast if you don’t have anything setup yet.

Assumptions

  1. Hugo is already installed, if not please check out the steps on how to install Hugo. For Windows OS, here’s a simple way to install Hugo.

  2. Git for Windows is also installed and setup. This is an optional step but it’s highly recommended if you want to track your edit history.

Steps

  1. Download and install Visual Studio Code. Once done, launch the editor.

  2. Download the following Visual Studio Code extensions to help you [Markdown Shortcuts, Better TOML, Git History]. While this step is optional, it will help to speed up your workflow in creating/editing your static site.

    Visual Studio Code Extensions for Hugo

  3. Once you created your Hugo workspace, open the folder from Visual Studio Code.

That’s about it and you’re ready to create your Hugo static site.

When you’re ready to publish the site, check out the post below if you’re thinking about hosting it on an IIS server.

Further Reading

How to Install Hugo on Windows 10
How to Deploy Hugo Static Website to IIS Using Git
How to Setup Naked Domain to Resolve in Cloudflare Pages
How to Open Visual Studio Code from command line macOS

Downloads

Visual Studio Code
Git
Hugo

May 30, 2018 Filed Under: How To Tagged With: Code Editor, Hugo, JAMStack, Microsoft, Visual Studio Code

How to Setup Visual Studio 2017 or 2019 for F#

If you want to try F# programming in Visual Studio 2017 (or 2019 for that matter), here’s what you might want to do to optimize Visual Studio to run optimally on your machine.

  1. From the menu, go to Tools and select Options.
  2. Under Debugging, set the Enable script debugging to True.
  3. Under Misc, set 64-bit F# Interactive to True (if you use 64-bit Windows OS).
  4. Set F# Interactive options to the following:
        --optimize- --readline+ --debug+ -d:TRACE
        
  5. Set Shadow copy assemblies to True and click OK.

    Visual Studio 2017 F# Tools initial settings

This “once and forget it” setup serves the following purposes:

  1. Enable you to debug F# in Visual Studio and run it as a 64-bit process (better).
  2. Set Visual Studio to output trace messages within F# scripts. You can also check the F# Interactive Options and the compiler options for more details.
  3. Set the referenced assemblies not to be locked by the F# Interactive process.
  4. Next, scroll up to Text Editor and expand on the F#.
  5. Under General, check the Line numbers and click OK.

    Visual Studio 2017 F# Options for Line numbers

One more tip with F# project, when creating a new F# project you can choose between .NET Core or .NET Standard. But you can also use the .NET Framework for F# Console Application. Just make sure you select Visual F# on the left-pane of the new project window, then you can select the .NET Framework you want to use for your project.

Start a new F# Console Application project with .NET Framework 4.6

Further Reading

Get Programming with F: A guide for .NET developers
F# Interactive Options
F# Compiler Options
Seq, List, Array, Map, Set. Which One to Use?

March 28, 2018 Filed Under: .NET, How To Tagged With: FSharp, Microsoft

How to Install Hugo on Windows 10

If you want to do it a bit differently than the instructions from Hugo website, you can do the following steps:

Steps to Download and Install Hugo for Windows

  1. Download Hugo zip file from Hugo Releases.

  2. Extract the zip file and you will see one executable and a couple markdown files.

    Contents in Hugo binaries for Windows

  3. Copy hugo.exe to your root folder, i.e. C:\Hugo\bin\ like so:Copy hugo.exe to C:\Hugo\bin folder
  4. Now add this path to your Environment Variables as shown below and click OK to all buttons.Add Hugo folder to Windows Environment Variables
  5. Test your Hugo from Command Prompt or Powershell.
      C:\Windows\system32> hugo version
      Hugo Static Site Generator v0.37 windows/amd64 BuildDate: 2018-02-27T09:15:58Z
    

That’s it and you’re ready to use Hugo. The next step is to setup your environment to create your static site if you haven’t done so.

When you need to upgrade Hugo, just replace the current hugo.exe with the latest version by repeating steps 1 and 2.

Further Reading

How to Setup Visual Studio Code for Hugo Static Site Generator
How to Deploy Hugo Static Website to IIS Using Git
How to Setup Naked Domain to Resolve in Cloudflare Pages

Download

Hugo Releases (all platforms)

March 7, 2018 Filed Under: How To Tagged With: Hugo, JAMStack, Windows

« Previous Page
Next Page »
Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Uncategorized
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Tags

.NET .NET Core AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP PowerShell Python Simple Mail Transfer Protocol Smtp Server SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2025 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure