This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SendPulse's Python Library: https://github.com/sendpulse/sendpulse-rest-api-python | |
from pysendpulse import PySendPulse | |
if __name__ == "__main__": | |
TOKEN_STORAGE = 'memcached' | |
SPApiProxy = PySendPulse(REST_API_ID, REST_API_SECRET, TOKEN_STORAGE) | |
email = { | |
'subject': 'This is the test task from REST API', | |
'html': '<p>This is a test task from https://sendpulse.com/api REST API!</p>', | |
'text': 'This is a test task from https://sendpulse.com/api REST API!', | |
'from': {'name': 'John Doe', 'email': '[email protected]'}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "Sendpulse.h" // SendPulse's Obj-C Library https://github.com/sendpulse/sendpulse-rest-api-objective-c | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doSomethingWithTheData:) name:@"SendPulseNotification" object:nil]; | |
Sendpulse* sendpulse = [[Sendpulse alloc] initWithUserIdandSecret:userId :secret]; | |
NSDictionary *from = [NSDictionary dictionaryWithObjectsAndKeys:@"Your Sender Name", @"name", @"[email protected]", @"email", nil]; | |
NSMutableArray* to = [[NSMutableArray alloc] initWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:@"Subscriber's name", @"name", @"[email protected]", @"email", nil], nil]; | |
NSMutableDictionary *emaildata = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"<b>Your email content goes here</b>", @"html", @"Your email text version goes here", @"text",@"Testing SendPulse API",@"subject",from,@"from",to,@"to", nil]; | |
[sendpulse smtpSendMail:emaildata]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SendPulse's Node.JS Library: https://github.com/sendpulse/sendpulse-rest-api-node.js | |
var sendpulse = require("./api/sendpulse.js"); | |
sendpulse.init(API_USER_ID,API_SECRET,TOKEN_STORAGE); | |
var email = { | |
"html" : "<p>Your email content goes here</p>", | |
"text" : "Your email text version goes here", | |
"subject" : "Testing SendPulse API", | |
"from" : { | |
"name" : "Your Sender Name", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// SendPulse's PHP Library: https://github.com/sendpulse/sendpulse-rest-api-php | |
require_once( 'api/sendpulseInterface.php' ); | |
require_once( 'api/sendpulse.php' ); | |
$SPApiProxy = new SendpulseApi( API_USER_ID, API_SECRET, 'file' ); | |
$email = array( | |
'html' => 'Your email content goes here', | |
'text' => 'Your email text version goes here', | |
'subject' => 'Testing SendPulse API', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SendPulse's Ruby Library: https://github.com/sendpulse/sendpulse-rest-api-ruby | |
require './api/sendpulse_api' | |
sendpulse_api = SendpulseApi.new(API_CLIENT_ID, API_CLIENT_SECRET, API_PROTOCOL, API_TOKEN) | |
email = { | |
html: '<p>Your email content goes here<p>', | |
text: 'Your email text version goes here', | |
subject: 'Testing SendPulse API', | |
from: { name: 'Your Sender Name', email: '[email protected]' }, | |
to: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SendPulse's Java Library https://github.com/sendpulse/sendpulse-rest-api-java | |
import com.sendpulse.restapi.Sendpulse; | |
public class Example { | |
public static void main(String[] args) { | |
Sendpulse sendpulse = new Sendpulse(API_CLIENT_ID, API_CLIENT_SECRET); | |
Map<String, Object> from = new HashMap<String, Object>(); | |
from.put("name", "Your Sender Name"); | |
from.put("email", "[email protected]"); | |
ArrayList<Map> to = new ArrayList<Map>(); | |
Map<String, Object> elementto = new HashMap<String, Object>(); |