Skip to content
Xharze edited this page Sep 24, 2012 · 1 revision

##Using NLog with GMail In order to use Mail target with GMail, you need to use the following server configuration:

<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <targets>
    <target name="gmail" type="Mail"
            smtpServer="smtp.gmail.com"
            smtpPort="587"
            smtpAuthentication="Basic"
            smtpUsername="[email protected]"
            smtpPassword="password"
            enableSsl="true"
            from="[email protected]"
            to="[email protected]"
            cc="[email protected];[email protected];[email protected]"
          />
  </targets>

  <rules>
    <logger name="*" minlevel="Debug" writeTo="gmail" />
  </rules>
</nlog>

(note that this is only supported in NLog 2.0 and higher, because NLog 1.0 does not support enableSsl parameter).

##Using NLog with Growl for Windows Ryan Farley has a great article on how to use NLog with Growl for Windows

Clone this wiki locally