Category: C#

Topics on programming language C#.

Using Mailgun in ASP.NET Core on Linux Mint 17

The Problem

How can I set up a simple ASP.NET Core web application (running on Linux Mint 17) that sends out email?  This is mostly so that the application can send out email on new account to confirm the user’s registration, and also to support password reset via email.

The Background

Some of you may know that I have hurt my left foot.  It is just so happened that .NET Core was released right around the same time.  To take a break from my usual routine and keep me distracted from my injury, I have decided to try something new: to learn C# and check out .NET Core on my Linux box (running Linux Mint 17.2 Rafaela / Ubuntu 14.04).

I started with the basic console application tutorial, then moved onto Web API, then Web Application.  The last one I tried was the tutorial on setting up email service with the web application.

I found parts of the email tutorial a bit tricky.  The reason being that not all email services out there support ASP.NET Core yet, and part of it being that plugging in credentials to their corresponding part in the API can be a bit confusing.

Because of that, I have decided to write up my own little tutorial so that later on, should I find the need to actually set up a web application with email service myself, I could follow these steps along and not having to figure these out all over again.

Read more