1. Go to this page and download the library: Download maatify/email-delivery 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/ */
use Maatify\EmailDelivery\Queue\DTO\EmailQueuePayloadDTO;
// Payload with optional replyTo — email goes TO the admin,
// but Reply-To is set to the customer so admin replies reach them.
$payload = new EmailQueuePayloadDTO(
templateKey: 'admin_notification',
language: 'en',
context: [
'customer_name' => 'Ahmed',
'customer_email' => '[email protected]',
'customer_message' => 'I need help with my account.',
],
replyTo: '[email protected]',
);
$queueWriter->enqueue(
entityType: 'contact_form',
entityId: '456',
recipientEmail: '[email protected]',
payload: $payload,
senderType: 1,
priority: 5
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.