ABDUL HAQUE ABDUL HAQUE - 9 months ago 48
ASP.NET (C#) Question

Asp.Net Sending bulk sms to a group of employees with respect to employee name

I am developing bulk sms application using Asp.net in which i need to send sms to a group of employees.

Once i select the group the employee number should pop-up in textbox and in message area i will specify the message with a placeholder like { name_employee }

where in place of placeholder i want to retrieve employee name such that each employee will get sms with his/her name only. They should get message like

Ex: 1.Employee Adam:- Hello Adam tomorrow board meeting is there at 12pm
2.Employee Riya:- Hello Riya tomorrow board meeting is there at 12pm
3.Employee Su-zain:- Hello Su-zain tomorrow board meeting is there at 12pm

Please anyone help me to achieve this.


Answer Source

If you're asking how to create a template, then there is a lot of freedom how to do it.

Here's one exmaple:

        const string template = "Hello {{name_here}}, the board meeting is tomorrow at 12pm";

        foreach( var name in new[]{ "Adam", "Eve" }){
            SendSms( template.Replace("{{name_here}}", name) );