Ejemplo n.º 1
0
<?php

use Kasl\SendPulse\ApiClient;
/*
 * Example: send email through smtp
 *
 * Documentation
 * https://login.sendpulse.com/manual/rest-api/
 * https://sendpulse.com/api
 */
$config = ['id' => '', 'secret' => '', 'storage' => ''];
$client = new ApiClient($config['id'], $config['secret'], $config['storage']);
// Send mail using SMTP
$email = ['html' => '<p>Hello!</p>', 'text' => 'text', 'subject' => 'Mail subject', 'from' => ['name' => 'John', 'email' => '*****@*****.**'], 'to' => [['name' => 'Client', 'email' => '*****@*****.**']], 'bcc' => [['name' => 'Manager', 'email' => '*****@*****.**']]];
var_dump($client->smtpSendMail($email));