# acymailing/10.11.1/back/dynamics/sendmail/plugin.php

AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress, version 10.11.1. 45 lines.

- Page: https://pluginprobe.com/plugins/acymailing/10.11.1/code/back/dynamics/sendmail/plugin.php
- Raw: https://pluginprobe.com/plugins/acymailing/10.11.1/raw/back/dynamics/sendmail/plugin.php
- Modified: 2025-01-27T11:09:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/acymailing/10.11.1/code/back/dynamics/sendmail/plugin.php#L10-L20`.

```php
<?php

use AcyMailing\Core\AcymPlugin;

class plgAcymSendmail extends AcymPlugin
{
    const SENDING_METHOD_ID = 'sendmail';
    const SENDING_METHOD_NAME = 'SendMail';

    public function __construct()
    {
        parent::__construct();
        $this->pluginDescription->name = self::SENDING_METHOD_NAME;
    }

    public function onAcymGetSendingMethods(&$data, $isMailer = false)
    {
        $data['sendingMethods'][self::SENDING_METHOD_ID] = [
            'name' => $this->pluginDescription->name,
            'image' => ACYM_IMAGES.'mailers/sendmail.png',
            'image_class' => 'acym__selection__card__image__smaller',
        ];
    }

    public function onAcymGetSendingMethodsHtmlSetting(&$data)
    {
        ob_start();
        ?>
		<div class="send_settings grid-x cell" id="<?php echo self::SENDING_METHOD_ID; ?>_settings">
			<div class="cell grid-x acym_vcenter acym__sending__methods__one__settings">
				<label for="<?php echo self::SENDING_METHOD_ID; ?>_path" class="cell">
                    <?php echo acym_translation('ACYM_SENDMAIL_PATH'); ?>
				</label>
				<input id="<?php echo self::SENDING_METHOD_ID; ?>_path"
					   class="cell"
					   type="text"
					   name="config[<?php echo self::SENDING_METHOD_ID; ?>_path]"
					   value="<?php echo acym_escape($this->config->get(self::SENDING_METHOD_ID.'_path', '/usr/sbin/sendmail')); ?>">
			</div>
		</div>
        <?php
        $data['sendingMethodsHtmlSettings'][self::SENDING_METHOD_ID] = ob_get_clean();
    }
}

```
