Skip to content

sarbacane-sdk/csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 

Repository files navigation

alt tag

Sarbacane SDK C# - Send e-mail and text messages (sms)

  • Account & API Key
  • Install from Nuget console manager
  • Download sources
  • Authentication
  • Buy credits
  • Send E-mail
  • Send SMS
  • Webhooks

Account & API Key

E-mail

Create E-mail account

Generate your E-mail Tokens (be logged in first)

email tokens

SMS

Create SMS account

Generate your SMS API Key (be logged in first)

api_key_real

Nuget

Install from Nuget console manager

Install-Package Sarbacane-Sdk

Sources

git clone https://github.com/sarbacane-sdk/csharp.git .

Authentication

E-mail
AuthenticationManager.setEmailTokens('MY_EMAIL_USERNAME', 'MY_EMAIL_APIKEY');
SMS
AuthenticationManager.setSmsApikey('MY_SMS_APIKEY');

Credits

Buy E-mail credits

Buy SMS credits

Send E-mail

    SBEmailMessage email = new SBEmailMessage();
    email.setMailFrom("sender@domain.com");
    email.setMailFromName("Sender Name");
    email.setSubject("Message sent by Sarbacane SDK C#");
	email.setHtmlBody("Here is the <b>HTML</b> content of the message.");
    email.setTextBody("Here is the content of the message");
    ArrayList recipientsList = new ArrayList();
    recipientsList.Add("address1@domain.com");
    recipientsList.Add("address2@domain.com");
    email.setRecipients(recipientsList);
    MessagesManager.sendEmailMessage(email);

Send SMS

    SBSmsMessage msg = new SBSmsMessage();
    msg.setType("notification");
    msg.setNumber("+33600000000");
    msg.setMessage("Confirmation code is: 283951");
    msg.setSender("SBSMS");
    msg.setCategory("confirmationCode");
    msg.setCampaignName("Authentication confirmation code");
    MessagesManager.sendSmsMessage(msg);

About

Sarbacane SDK C# to send E-mails and Text messages (sms).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages