Last active
August 1, 2017 17:17
-
-
Save sendpulse/3dd961a6ed421af2f4b4 to your computer and use it in GitHub Desktop.
SendPulse REST API Usage Example for Ruby https://github.com/sendpulse/sendpulse-rest-api-ruby
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: [ | |
{ | |
name: "Subscriber's name", | |
email: '[email protected]' | |
} | |
] | |
} | |
sendpulse_api.smtp_send_mail(email) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment