|
Hi I want to design a Stored Proc to send out emails in the followinf format. Insert Data(1 Paragraph- About 10 sentences- Remains the same for all emails) Insert Table (Different for different emails) Static Data (1 Paragraph - About 15 sentences- Remains the same for all emails) I know how to get the table there but what would be the best way to Insert the 2 paragraphs? Store them in a table? Or in a temporary folder? Thanks, Shivu
(comments are locked)
|
|
Either store them in a table or leave them as data within the stored procedure. Both solutions would work easily, it depends on how often changes would be made to the static paragraphs and who would make potential changes to them. It would be better to allow users permissions to update that data in a table than alter the procedure. It would probably be even better to leave the database mail alone for this one. I mean it is easy enough to outsource the activity of sending email to the front end and reduce the procedure to only insert data. Database mail was originally designed so it could send alerts to the DBA about completed/failed jobs, but eventually was somehow expanded to perform the tasks which clearly belong to the front ends.
Jun 29 '11 at 01:56 PM
Oleg
+1 for Oleg. That does sound like a front-end type of task. If you migrate that back to the application layer, you'll gain some advantages like being able to format the text better.
Jun 29 '11 at 05:55 PM
Kevin Feasel
(comments are locked)
|

