• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: RSForm - SMS Message - With Zenvia - Solved

RSForm - SMS Message - With Zenvia - Solved 11 years 2 months ago #26779

This topic is about send SMS message,

Recently i needed create a form that send SMS message and a E-mail messagem, so i followed this steps:

1- I hired a Mobile Service, there are a lot company of this kind in the world, but here in Brasil São Paulo i work with Zenvia - www.zenvia.com.br.

2 - After hire the company you need Integration scripts provided by mobile Services.
- You you'll need the all script.
- And user and password to database connection provided by the service.

3- I show you Exemple of script that your mobile service can send to you
- Coments is preceded by ////

if(empty($invalid)){

////make sure the path specified here is correct

include_once 'human_gateway_client_api/HumanClientMain.php';
function envia($site,$empresa,$nome,$user,$msg1,$msg,$Status,$telefone){
$msg=utf8_decode("$site $empresa $nome: $user $msg1 $msg $Status $telefone");

//// script where the phone number is.

$t=time();
$msg_list .= "5511000000000;$msg;${t}07\n";

//specify the account username and password
$humanMultipleSend = new HumanMultipleSend("username", "password");

$response = $humanMultipleSend->sendMultipleList(HumanMultipleSend::TYPE_C, $msg_list);

foreach ($response as $resp) {
return array($resp->getCode(),$resp->getMessage());
}

}

////send the message. You will have to use your actual field naming here (fils name created in RSform)

$resp=envia($_POSTSite[/b]'],$_POSTEstabelecimento[/b]'],$_POSTNome[/b]'],$_POST,$_POSTmsg1[/b]'],$_POSTmsg[/b]'],$_POSTStatus[/b]']);

//// The custom files created by RSjoomla is


//handle errors, invalidate the telephone field for example

if($resp[0]!=200)
$invalid[] = RSFormProHelper::getComponentId("telefone");
}


4- Put the code inside the PHP scrip area called "The $thankYouMessage" ou "POST".

5- Save and test the form.

//// I think 4 things is important to this integration:

- PHP script,
- username and password (database connection),
- field naming, in my case is like this in PHP script area : $_POST, the word Nome is the field name created in RSform.
- Where to put the PHP script in RSform.

Any questions i will be glad to help.
Last Edit: 11 years 2 months ago by carlos.avellar9.
The administrator has disabled public write access.

RSForm - SMS Message - With Zenvia - Solved 10 years 3 months ago #30051

  • dispatch
  • dispatch's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 1
Hello Carlos and thank you for the post. Have you made one for RECEIVE SMS please?

Thank you in advance,

jim
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!