PHP code example of senderkit / senderkit-symfony

1. Go to this page and download the library: Download senderkit/senderkit-symfony library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

senderkit / senderkit-symfony example snippets


public function __construct(private readonly \SenderKit\Client $senderkit) {}

$this->senderkit->send(new TemplateSend(template: 'welcome', to: $email));

use SenderKit\Symfony\Webhook\RequestVerifier;

public function webhook(Request $request, RequestVerifier $verifier): Response
{
    $event = $verifier->verify($request); // throws SignatureVerificationException on bad signature, RuntimeException if unconfigured
    // ...
}