I have a requirement to send birthday email to employee and have a procedure that needs to be modified to include templates .
Whenever it is employee's birthday, i.e. sysdate=employee_birthday, an email would be triggered to a particular email id on that day.
The format of email is the main challenge as it needs to be as greeting template.
I had no idea on how to save the images so using the method suggest in the thread, created 2 regions for emp_pic and greeting pic and stored them in tables: EMP_BLOB_TBL and GREETING_BLOB_TBL.
However when i upload image from app, there is always an error on page saying error uploading image, (that's a different issue however and will require a new thread)
How to upload an image (file) into a table (BLOB) in APEX 5 (for dummies) (0 Bytes)
Now i am still able to upload and save the images in these tables, so moving to requirement details:
For employee_pic for email, the image name would match employee name.
So when employee pic is uploaded it would have name of employee. So for Allan Pedro, image_name is also Allan Pedro.
Similary for greeting, the table BRTHDAY_GREETING has date column.
So greeting image is uploaded with the name as birth date.
Now, what needs to be done is in the procedure i have written for this.
Now, the expected email format (in display order) generated on every day which is a birthday is that should be generated modifying the procedure is:
The dates would be matched on month and day only obviously like the condition i have put in procedure, to convert in DD/MM format and truncate to remove the year part so that they match exactly.
So basically, all the GREETING and WISH DATE Content matching with the employee's birthday date need to be displayed in the email
I understand its pretty lengthy and have tried my best explaining and in case there are questions i'll be more than happy to answer.