Last active
May 4, 2021 21:12
-
-
Save sendpulse/8bf33ff86a6617816661 to your computer and use it in GitHub Desktop.
SendPulse REST API Usage Example foк PHP (https://sendpulse.com/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
<?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', | |
'from' => array( | |
'name' => 'Your Sender Name', | |
'email' => '[email protected]' | |
), | |
'to' => array( | |
array( | |
'name' => 'Subscriber Name', | |
'email' => '[email protected]' | |
) | |
) | |
); | |
var_dump( $SPApiProxy->smtpSendMail( $email ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment