<?php
namespace App\classe;
use Mailjet\Client;
use Mailjet\Resources;
class Mails
{
private string $api_key = '26b976773bbb506e02132ca576309987';
private string $api_secret_key = '4804599235f648193c810de948ac73ab';
public function sendMail( $subjet, $content)
{
$mj = new Client($this->api_key, $this->api_secret_key, true,['version' => 'v3.1']);
$body = [
'Messages' => [
[
'From' => [
'Email' => "kkouame@sifogroup.com",
'Name' => "SCI CAWALLY"
],
'To' => [
[
'Email' => "sifogrouptic@gmail.com",
'Name' => "Administrateur"
]
],
'TemplateID' => 3998409,
'TemplateLanguage' => true,
'Subject' => $subjet,
'Variables' => [
'content' => $content,
]
]
]
];
$response = $mj->post(Resources::$Email, ['body' => $body]);
$response->success() ;
}
}