Using Universal SMS Plugin to Send Message from External Plug-in(s):

You can also use Universal SMS Plug-in to send message from external plug-in(s). For this you need to follow following steps:

Step 1: Add reference Universal SMS Plug-in Assembly(DLL) which is located under Plugins → XcellenceIt.Sms folder as shown below.

Step 2: Set “Copy Local” property of referenced assembly to “False” as shown below.

var controller = DependencyResolver.Current.GetService<Nop.Plugin.XcellenceIt.Sms.Controllers.NopSmsController>();

bool sent = controller.SendMessge(91, "98XXXXXXXX", 1, "sample test message", “42”);

Parameters sent in “SendMessage” function as shown above and function return type are as below:

<param name="countryIsd">Country ISD Code</param>

<param name="mobileNumber">Receiver mobile number</param>

<param name="interfaceId">Interface Id to be used while sending message</param>

<param name="messageText">Message body</param>

<param name="countryId">country Id</param>

<returns>True if message is sent successfully else False</returns>

Note: CountryId and CountryIsd is optional fields you need to send any of the one field with value and pass zero other field. If you have passed CountryIsd code then pass country id as zero and if you have passed country id then pass CountryIsd code as zero.