I just created new module using smsframework. then i found the $message variable (sms_send()) is full text/string, hard to use.

My sms services company provide different type sms services, one is verification code which not allow full text but only template variable.
i should pass parameters and template id to sms server, the sms server do rest job.

if $message variable is an array, should be good. like this :

  $message = array(
    // template, text, other type?  text meaning no need to process message.
    'type' => "template", 
    'text' => "Your verification code is 1234.", // full text, optional for template type.
    'code' => "1234", // verification code
    'templateid' => "tpl_981234567",
    'template' => "Your verification code is !code",
    'otherkey' => "whatever", // no limit 
  );

if i write new module handle every step, the $message variable can controlled by myself. but i need other module pass the $message variable.
if there are any variables like 'verification code' inside $message text, it should separate as key => value inside $message., so user can handle it flexibly.

Comments

dzy created an issue. See original summary.

dzy’s picture

Issue summary: View changes
almaudoh’s picture

Version: 7.x-1.0-rc1 » 7.x-1.0

We're already in 7.x-1.0 stable.

almaudoh’s picture

Version: 7.x-1.0 » 7.x-1.x-dev