Building Email Templates???

Building Email Templates???

Old forum URL: forums.lhotka.net/forums/t/4373.aspx


AKaplan posted on Wednesday, February 20, 2008

How is it possible to handle email events when something is entered in the DB. for example...

say an order was placed and u need to send an email to your customer of the order reciept? how is this handled in csla?

or what about just normal emailing of private or group messaging using csla?

ajj3085 replied on Wednesday, February 20, 2008

This is something I think should be handled outside of Csla.  I use Sql Server Notification Services, but that's going away in Sql Server 2008, but for Sql 2008 I think the answer is supposed to be Reporting Services.

JoeFallon1 replied on Wednesday, February 20, 2008

Emailing is not a CSLA function.

It can be part of your application though.

I have a table in my DB where I enter basic information required for an email.

I have a scheduled job that runs every X minutes which reads that table and sends email messages and then clears the row after the message is sent.

The objects to fill the table and send the emails are built using CSLA.

Joe

 

ajj3085 replied on Wednesday, February 20, 2008

Joe,

You're re-inventing the Notification Services engine.  Smile [:)]

AKaplan replied on Wednesday, February 20, 2008

What about the use of Sql Server's Database Mail? isn't that what it's for?

ajj3085 replied on Wednesday, February 20, 2008

Not really.  There's more than just getting the email out.. what if the mail server is down?  You need code to handle that (unless you don't care about a bunch of emails never being sent).  NS has all that built in, and will retry failed notifications. 

AKaplan replied on Wednesday, February 20, 2008

ok, sounds like a plan

ajj3085 replied on Wednesday, February 20, 2008

Well, just remember NS is gone from Sql Server 2008... but supposedly  you can do the same thing with reporting services.

JoeFallon1 replied on Wednesday, February 20, 2008

ajj3085:
Joe,

You're re-inventing the Notification Services engine.  Smile [:)]

Hey!

This app was designed this way since 1997!

SQL Server must have copied us. <g>

Besides, I needed it to work with Oracle too. (Which we finally got rid of!!!! YEAHHH.)

Joe

 

ajj3085 replied on Wednesday, February 20, 2008

Ha... ok, didn't know that.

Copyright (c) Marimer LLC