Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 36665 invoked from network); 9 Dec 2009 10:16:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Dec 2009 10:16:28 -0000 Received: (qmail 19129 invoked by uid 500); 9 Dec 2009 10:16:28 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 19091 invoked by uid 500); 9 Dec 2009 10:16:27 -0000 Mailing-List: contact log4net-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET User" List-Id: Delivered-To: mailing list log4net-user@logging.apache.org Received: (qmail 19082 invoked by uid 99); 9 Dec 2009 10:16:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 10:16:27 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of miniscalope@gmail.com designates 209.85.217.221 as permitted sender) Received: from [209.85.217.221] (HELO mail-gx0-f221.google.com) (209.85.217.221) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 10:16:24 +0000 Received: by gxk21 with SMTP id 21so4975776gxk.10 for ; Wed, 09 Dec 2009 02:16:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=a3rZYhmzDW3SdCA22IpMsi2E75B0hkjeIZe6XDtgEZA=; b=FyiKFrdyJRj/6EGUd0f2qMkVyEO/XY7+odtDabO0ebmfxvFrO69vSx0O8GFBrN2/DU nt4sDAEVUpinnnsbe+BxGGDwsEMQs2vZa5rA/UjeinYsPSxqKshhZqL7aAtTgPIJxB3y RQtF8xJi0HSZNbQCA5XULLggBM37493ncdigs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=jNUNbRWqcFvdpYA3V/kw/zFHMSIJ1lUKlYPykjqMnNoVefQ0qge9U6hSb3NlNJKwQz zy2tLnbm7ZvXpiRAJ2CyKhsxwA5v8el21d0jaankRUBgnkXwg9BMhfpW0VhOmFEUDrfd 6Hx0+9xqkpJf2LI80vCaHUsrONDuM4U4YGubw= MIME-Version: 1.0 Received: by 10.101.180.19 with SMTP id h19mr7297532anp.137.1260353763922; Wed, 09 Dec 2009 02:16:03 -0800 (PST) In-Reply-To: References: <6af26d830911301507u66c23fb0s9d02ec781f377cb1@mail.gmail.com> <6af26d830912071112r736306a4w81d871920c4ad8fc@mail.gmail.com> Date: Wed, 9 Dec 2009 11:16:03 +0100 Message-ID: <6af26d830912090216y64c06c79r72dc74e7861a2431@mail.gmail.com> Subject: Re: Customized mail subject fo SmtpAppender From: Petite Escalope To: Log4NET User Content-Type: multipart/alternative; boundary=001636c9283363d576047a48fa13 --001636c9283363d576047a48fa13 Content-Type: text/plain; charset=ISO-8859-1 Thank you :) 2009/12/8 Pascal ROZE > Hi > > Look at this: http://www.codeproject.com/KB/cs/log4net_SmtpAppender.aspx > > Cheers > > 2009/12/7 Petite Escalope > > Hello, >> I am using log4net for a web project and would like to make customized >> mail subjects my email appender. I already tried something like : >> >> * * >> >> * public static void MailInfo(string msg, string subjectDetails)* >> >> * {* >> * log4net.ThreadContext.Properties["mailsubject"] = >> subjectDetails;* >> * Log.Mail.Info(msg);* >> * log4net.ThreadContext.Properties.Clear();* >> * }* >> * >> * >> But it renders CovCake LOG INFO : (null). >> * >> * >> Is there a way to customize mail subject natively (i mean without >> overriding existing classes or extending the SmtpAppender)? >> * >> * >> *T*hank you very much. Sorry for my english. >> >> Best *regards* >> >> >> > -- Cordialement Alexandre Codjovi 06 59 08 39 82 alexandre@codjovi.fr --001636c9283363d576047a48fa13 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thank you :)

2009/12/8 Pascal ROZE <pascal.roze@gmail.= com>
Hi

Look at this: http://www.codeproject.com/KB/cs/log4= net_SmtpAppender.aspx

Cheers

2= 009/12/7 Petite Escalope <miniscalope@gmail.com>

Hello,
I am using log4net for a web project and would like to= make customized mail subjects my email appender. I already tried something= like :

=A0=A0 =A0 =A0 =A0 =A0<subject type=3D"= log4net.Util.PatternString" value=3D"CovCake LOG INFO : %property= {mailsubject}" />

=A0public static void MailInfo(string = msg, string subjectDetails)
=A0=A0 =A0 =A0 = =A0 =A0 =A0{
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0log4net.ThreadContext.Properties[= "mailsubject"] =3D subjectDetails;
=A0=A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0L= og.Mail.Info(msg);
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0l= og4net.ThreadContext.Properties.Clear();
=A0=A0 =A0 =A0 =A0 =A0 =A0}

But it renders=A0CovCake LOG INFO : (= null).

Is there a way to customize m= ail subject natively (i mean without overriding existing classes or extendi= ng the SmtpAppender)?

Thank you very much. Sorry for my english= .
=A0=A0=A0
B= est=A0regards






--
Cordialement

Ale= xandre Codjovi
06 59 08 39 82
alexandre@codjovi.fr
--001636c9283363d576047a48fa13--