Can i use webservice to send mails using emailTraceListener

Topics: Exception Handling Application Block
May 15, 2009 at 2:02 PM

Hi,

 

   Can you please explain me wheather i can use webservice to send mails by using emailtrace listener.If so can you please tell me the process?

 

Thanks In advance

May 18, 2009 at 3:04 AM

Yes you can.  Have you used the email tracelistener before with a win app or web app?   If so, the process is the same regardless of what type of application you're planning to use it on.  Configure your Logging Application Block by:

1. Add an Email TraceListener, set the required properties mentioned in the documentation.

2. Add a category then add a tracelistener reference pointing to your email tracelistener.

3. You can then log using this piece of code:

           LogEntry log = new LogEntry();

           log.Categories.Add("General"); //General is the name of the category to which your tracelistener belongs to         

           //set the log properties 

           Logger.Write(log);

 

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.

entlib.support@avanade.com

May 18, 2009 at 3:19 AM
I have one more doubt ....I set filter for each type of trace listner.But it is not working ?
 
if an error occurs all trace listeners logging for that error
 
Can you send any solution for this
 
Thanks
In advance

On Fri, May 15, 2009 at 9:02 AM, sg527j <notifications@codeplex.com> wrote:

From: sg527j

Hi,

 

   Can you please explain me wheather i can use webservice to send mails by using emailtrace listener.If so can you please tell me the process?

 

Thanks In advance

Read the full discussion online.

To add a post to this discussion, reply to this email (entlib@discussions.codeplex.com)

To start a new discussion for this project, email entlib@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


May 18, 2009 at 3:49 AM

"if an error occurs all trace listeners logging for that error" - could you explain this a bit further?  What is that error, is that an exception?  I think it'll be better first if you could post your config file here.

 

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.

entlib.support@avanade.com