You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
898 B
27 lines
898 B
<?php
|
|
require 'vendor/autoload.php';
|
|
use \Mailjet\Resources;
|
|
$mj = new \Mailjet\Client('****************************1234','****************************abcd',true,['version' => 'v3.1']);
|
|
$body = [
|
|
'Messages' => [
|
|
[
|
|
'From' => [
|
|
'Email' => "director@c4m.mg",
|
|
'Name' => "Stephane"
|
|
],
|
|
'To' => [
|
|
[
|
|
'Email' => "director@c4m.mg",
|
|
'Name' => "Stephane"
|
|
]
|
|
],
|
|
'Subject' => "Greetings from Mailjet.",
|
|
'TextPart' => "My first Mailjet email",
|
|
'HTMLPart' => "<h3>Dear passenger 1, welcome to <a href='https://www.mailjet.com/'>Mailjet</a>!</h3><br />May the delivery force be with you!",
|
|
'CustomID' => "AppGettingStartedTest"
|
|
]
|
|
]
|
|
];
|
|
$response = $mj->post(Resources::$Email, ['body' => $body]);
|
|
$response->success() && var_dump($response->getData());
|
|
?>
|