Link to home
Start Free TrialLog in
Avatar of Hiren Lapsiwala
Hiren LapsiwalaFlag for Kenya

asked on

Group Emailing from SQL SERVER

Hi

I want to send email groupwise. For example, i want to send emails to department heads for the people working in their departments. I have 10 departments so need to send 10 emails to their heads regarding the attendance of their respective department staff.

Any solution, plz advice
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

You can use sp_send_dbmail to send emails.

For more details please refer - https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-send-dbmail-transact-sql
Avatar of Hiren Lapsiwala

ASKER

Thanks Pawan Kumar

By the procedure, i can send a single file to multiple email ids but i want some solution to generate multiple files and send to their respective head of the departments.
Avatar of Pushpakumara Mahagamage
create separate table with recipient, massage body, is sent, etc. and insert attendance data to that table, and create sp to send mail from your table. and then schedule your own SendDbMail sp as you need.
>>but i want some solution to generate multiple files

Multiple files means? Do you want to send multiple files as attachment ?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.