I have an Oracle database and you need to send emails based on events that occur in my Dot Net web application. HTML email notifications. I have different templates that are used depending on the email notifications that should be generated. Each of them is associated with Sproc. Therefore, when the event is fired, I pass the Id to the handler, and it calls sproc. Then I get an email template that is in HTML format and has tags that should be replaced with fields from sproc. Then I search and replace any tags in the template with the corresponding field from the recordset. The recipeint email is placed and the email is sent as HTML. It all works great.
However, I now have a requirement to show several rows in a table in an email notification. So, for example, the details of books from the library. I could get all the rows and build the rows of the HTML table on the fly in a point network, iterating over the recordset and creating a new row for each recordset, but it will break my general tag replacement approach. So I would like to know if I can build these few rows in PL SQL and return it as one field, where I can replace the tag in my html email template with the contents of the field from the recordset. This field will contain the HTML version of all required entries ... ready to be used as a table. So I would have a tag in my template called OVerDueBooks and replace that tag with the Over_Due_Books field from my recordset.In this field, all recorded records in html format will be recorded, so I need to replace the tag with content.
thanks Mika
source
share