| @@ -1,0 +1,42 @@ | ||
| 1 | +<?php | |
| 2 | + | |
| 3 | +use AcyMailing\Core\AcymPlugin; | |
| 4 | + | |
| 5 | +class plgAcymSendmail extends AcymPlugin | |
| 6 | +{ | |
| 7 | + const SENDING_METHOD_ID = 'sendmail'; | |
| 8 | + const SENDING_METHOD_NAME = 'SendMail'; | |
| 9 | + | |
| 10 | + public function __construct() | |
| 11 | + { | |
| 12 | + parent::__construct(); | |
| 13 | + $this->pluginDescription->name = self::SENDING_METHOD_NAME; | |
| 14 | + } | |
| 15 | + | |
| 16 | + public function onAcymGetSendingMethods(&$data, $isMailer = false) | |
| 17 | + { | |
| 18 | + $data['sendingMethods'][self::SENDING_METHOD_ID] = [ | |
| 19 | + 'name' => $this->pluginDescription->name, | |
| 20 | + 'image' => ACYM_IMAGES.'mailers/sendmail.png', | |
| 21 | + 'image_class' => 'acym__selection__card__image__smaller', | |
| 22 | + ]; | |
| 23 | + } | |
| 24 | + | |
| 25 | + public function onAcymGetSendingMethodsHtmlSetting(&$data) | |
| 26 | + { | |
| 27 | + ?> | |
| 28 | + <div class="send_settings grid-x cell" id="<?php echo esc_attr(self::SENDING_METHOD_ID); ?>_settings"> | |
| 29 | + <div class="cell grid-x acym_vcenter acym__sending__methods__one__settings"> | |
| 30 | + <label for="<?php echo esc_attr(self::SENDING_METHOD_ID); ?>_path" class="cell"> | |
| 31 | + <?php echo esc_html(acym_translation('ACYM_SENDMAIL_PATH')); ?> | |
| 32 | + </label> | |
| 33 | + <input id="<?php echo esc_attr(self::SENDING_METHOD_ID); ?>_path" | |
| 34 | + class="cell" | |
| 35 | + type="text" | |
| 36 | + name="config[<?php echo esc_attr(self::SENDING_METHOD_ID); ?>_path]" | |
| 37 | + value="<?php echo esc_attr($this->config->get(self::SENDING_METHOD_ID.'_path', '/usr/sbin/sendmail')); ?>"> | |
| 38 | + </div> | |
| 39 | + </div> | |
| 40 | + <?php | |
| 41 | + } | |
| 42 | +} | |