# boolean_smtp_mail_transport_send

> Fires immediately before the message is handed to PHPMailer's transport.

Action · Tier B · Since 1.0.0



## Signature

```php
add_action( 'boolean_smtp_mail_transport_send', $callback, 10, 2 );
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$message` | `\BooleanSmtp\Services\Mailer\MailMessage` | Message being sent. |
| `$phpmailer` | `\PHPMailer\PHPMailer\PHPMailer` | Mailer instance about to send. |

## Fires in

- [app/Services/Mailer/BooleanSmtpMailPipeline.php:191](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Services/Mailer/BooleanSmtpMailPipeline.php#L191) — `BooleanSmtp\Services\Mailer\BooleanSmtpMailPipeline::send()`

## Example

```php
add_action( 'boolean_smtp_mail_transport_send', function ( \BooleanSmtp\Services\Mailer\MailMessage $message, \PHPMailer\PHPMailer\PHPMailer $phpmailer ) {
    // React to the event.
}, 10, 2 );
```
