I am inspire to write this blog on the day of Ramzan when I want to send multiple greetings to my friends, family and others. I thought to create script which will read email IDs from excel and send Greeting to all of them.
We have to follow below steps to configure this process.
Insert Greetings to dbo.Greeting table.
Create procedure dbo.cp_Send_Greeting with parameter GreetingName.
Execute procedure dbo.cp_Send_Greeting. Below is greeting mail.
Below are the scripts to download.
Below is sample document to use it.
We have to follow below steps to configure this process.
- Create Error_Log Table (Check blog http://www.sqlscientist.com/2013/07/error-logging-and-alerts.html)
- Create Greeting table
- Columns
- GreetingName
- This is unique name to identify greeting which we will send to all email addresses.
- FromName
- This will be written as from clause in email body.
- FromMail
- This will be use your from email address.
- ToMailListFilePath
- This is path of excel which will contain list of name with their email ids.
- Subject
- This is subject of your greeting.
- Message
- This is message for your greeting.
- GreetingImgUrl
- This is greeting image url hosted on some server.
- GreetingName
- Columns
Below are the scripts to download.
Below is sample document to use it.
No comments:
Post a Comment