Similar Posts


  1. Do you have a tutorial on how to integrate MailKit with ASP.Net Core 5.0’s identity registration and email confirmation system?

  2. Am I the only one who thinks that in 2021, with the latest Microsoft web development platform, sending email should be a tad easier than this?

    You would think the kind of basic functions every web site needs, like sending an email, should be baked in, so it’s just one or two lines of code. I should not have to be created controllers and services and whatever else. If they really cannot do that, at least have these things set up from the start within the basic scaffolding that VS creates for a new web.

    Every single web app is going to need this, so either make it super easy single line of code, or build it in from the default template. Don’t make us all figure out our own solutions that we need to include with every site.

    1. It is easier to design a page to have the user set it up themselves to receive email from the amount of code required to implement a smtp client. As .net developer of 16 years it is still the same hoops and hurdles to cross when it comes to email. It should be this way because email is not a tool it is a weapon. In the wrong hands can bring down entire systems.

  3. Hi
    Thank you for the detailed explanation.
    I build mms server and i need to send the mms by smtp client.
    The body of the mms is a smil format.
    how i can send smil include(eg image file) with this client.

    david tzur

  4. Hello,

    I`ve downloaded the source of the demo from git, but it throws inner exception when I try to send an email but it throws inner exception on line 43 in EmailService: emailClient.Authenticate(_emailSettings.EmailId, _emailSettings.Password);

    The exception says: + $exception {“535: 5.7.8 Error: authentication failed: UGFzc3dvcmQ6”} MailKit.Security.AuthenticationException

    What could be the reason?

    Thanks in advance!

    1. You will have to configure (add details of) your SMTP server with a valid User Id & Password of your mail account using which email should be sent

  5. How can I use this to create a contact form on my website please?
    Do you have a contact form template that I can work with, and integrate into this project?

    1. Hi Anthony.. You can create a simple cshtml page using which you can capture the required data and post it to the controller on form submission. In the controller, you can use that data to send an email using the email service.

      1. Sanjay, thanks very much for the reply. I understand what you are suggesting. However, I do not have the expertise to design the contact page and to post the data to the EmailController.cs. The project works fine using the SwaggerUI (i.e. it sends emails to the desired email address). I just need a pre-configured cshtml ‘contact form’ page that I can use with the API. Can you point me in the right direction please? Alternatively, can you offer this as a service? I am happy to pay for your expertise and time.

Leave a Reply

Your email address will not be published. Required fields are marked *