# boolean_smtp_plain_text_body

> Filters the automatically generated plain-text alternative body.

Filter · Tier A · Since 1.0.0

Return a modified string to use as the message's plain-text part.

## Signature

```php
add_filter( 'boolean_smtp_plain_text_body', $callback, 10, 2 );
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$plainText` | `string` | Plain-text body generated from the HTML body. |
| `$htmlBody` | `string` | Original HTML body the plain-text version was generated from. |

**Returns** `string` — The filtered plain text.

## Fires in

- [app/Services/Mailer/MailerManager.php:289](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Services/Mailer/MailerManager.php#L289) — `BooleanSmtp\Services\Mailer\MailerManager::configure()`

## Example

```php
add_filter( 'boolean_smtp_plain_text_body', function ( string $plainText, string $htmlBody ) {
    return $plainText;
}, 10, 2 );
```
