Nlog: Implement MailTarget for .NET Core

Created on 3 Sep 2016  路  17Comments  路  Source: NLog/NLog

Feature

The mail target isn't supported in net core as Microsoft didn't port the mail classes. See link platform support.
https://github.com/NLog/NLog/wiki/platform-support

SMTPClient is not supported, see https://github.com/dotnet/corefx/issues/1006
but we could use MailKit https://www.nuget.org/packages/MailKit/

.NET core feature up-for-grabs

Most helpful comment

I have created an additional package for this - the NLog.MailKit package

With your config it should work :)

Also add this to your config:

<extensions>
    <add assembly="NLog.MailKit"/>
</extensions>

Currently not implemented:

  • Encoding
  • PickupDirectory
  • NTLM auth

All 17 comments

how to implemented this:

  1. fork
  2. create new branch from coreCLR branch
  3. implement using mailkit for UWP10 (we still have to rename it)
  4. add/enable unit tests
  5. send PR to coreCLR branch

I see two coreCLR branches with git bash; upstream/coreCLR and NLog/coreCLR. I am not sure which branch I need.

Also master branch is used to rebase in contributing.md.

git rebase upstream/master

Do I need to rebase with coreCLR instead of master?

git rebase upstream/coreCLR

I think NLog/coreCLR , but please post the output of following command:

git remote -v (in the nlog folder)

Thanks Julian.

I will able to take look at weekend.

Hey @304NotModified.

Here is the output of git remote -v command:

$ git remote -v
NLog    https://github.com/NLog/NLog.git (fetch)
NLog    https://github.com/NLog/NLog.git (push)
origin  https://github.com/UgurAldanmaz/NLog.git (fetch)
origin  https://github.com/UgurAldanmaz/NLog.git (push)
upstream        https://github.com/NLog/NLog.git (fetch)
upstream        https://github.com/NLog/NLog.git (push)

So NLog and upstream are the same. If there aren't the same locally, use git fetch -a (fetch all).

You could drop one of the remotes, I would remove "upstream"

You could do that in TortioseGit (contextmenu -> settings)
image

or

git remote rm upstream

I added upstream according to our contributing instructions :)

Ok. I will be available next week.

Looking forward to this! Is there a branch available that I can test out?

Hi @mb2140. Thanks for your interest. Unfortunately I could not find free time to work on this yet.

But I will complete as soon as possible.

@mb2140 if you like to test it soon, maybe it's easier to create your own extension. We could guide you how to set this up.

hello - any updates on this issue/missing feature? We would really like to use the mail target!!

Nope. It should not to be difficult to implement though. I could help you with that.

I have created an additional package for this - the NLog.MailKit package

With your config it should work :)

Also add this to your config:

<extensions>
    <add assembly="NLog.MailKit"/>
</extensions>

Currently not implemented:

  • Encoding
  • PickupDirectory
  • NTLM auth

@304NotModified Installed and working great so far. Thanks for working on this!

Thanks! Encoding also added :)

If everything works well, I will create a final release soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carkov1990 picture carkov1990  路  3Comments

ranjan-2209 picture ranjan-2209  路  3Comments

vasumsit picture vasumsit  路  3Comments

smeegoan picture smeegoan  路  3Comments

JustArchi picture JustArchi  路  3Comments