Authorise an email address for sending Email to SMS


Parameter

Description

Required

emailEmail address to register. You may also register a wild-card email which allows any user on the same domain to use Email to SMS.

Wild-card format: *@example.com
YES
max_smsThe maximum number of SMS messages to send from one email message sent from this email address.

Possible values:
1 - up to 160 characters (default)
2 - up to 306 characters
3 - up to 459 characters
4 - up to 612 characters
NO
numberOptional dedicated virtual number virtual numberNO


Example


curl https://api.transmitsms.com/add-email.json \
  -u 2e24c1cbdd987221e165d543f34b84bf:secret \
  -d 'email=email@client.com'
  -d max_sms=2


JSON ResponseXML Response

{
    success: true
}

<?xmlversion="1.0"encoding="UTF-8"?>
<response>
  <success>true</success>
</response>


PHP Examples


<?php

 include'../../APIClient2.php';

 $api=new transmitsmsAPI("API_KEY",'API_SECRET');

 

 $result=$api->addEmail('email@client.com',1);

 if($result->error->code=='SUCCESS')

 {

     echo"Email added";

 }

 else

 {

     echo"Error: {$result->error->description}";

 }