@param Mail\Message $oMessage
@param              $sHtml
@param              $sPlain

@return $this
174886
protected function setBodyWithoutAttachments(Mail\Message $oMessage, $sHtml, $sPlain)
    {
        $oContent = $this->getContentMessage($sHtml, $sPlain);
        $oMessage->setBody($oContent);

        $oHeaders = $oMessage->getHeaders();

        if (!$oHeaders->has('Content-Type')) {
            $oHeader = new Mail\Header\ContentType();
            $oHeaders->addHeader($oHeader);
        }

        $oHeaders->get('Content-Type')->setType(Mime\Mime::MULTIPART_ALTERNATIVE);

        return $this;
    }
549703
private function addTrigger(TdbPkgShopPaymentIpnMessage $oMessage)
    {
        $oGroup = $this->getPaymentHandlerGroup();
        $oStatus = $this->getIpnStatus();
        if (null === $oStatus) {
            return;
        }

        $query = "SELECT `pkg_shop_payment_ipn_trigger`.*
                    FROM `pkg_shop_payment_ipn_trigger`
              INNER JOIN `pkg_shop_payment_ipn_trigger_pkg_shop_payment_ipn_status_mlt` ON `pkg_shop_payment_ipn_trigger`.`id` = `pkg_shop_payment_ipn_trigger_pkg_shop_payment_ipn_status_mlt`.`source_id`
                   WHERE `pkg_shop_payment_ipn_trigger_pkg_shop_payment_ipn_status_mlt`.`target_id` = '".MySqlLegacySupport::getInstance()->real_escape_string(
                $oStatus->id
            )."'
                     AND `pkg_shop_payment_ipn_trigger`.`shop_payment_handler_group_id` = '".MySqlLegacySupport::getInstance()->real_escape_string(
                $oGroup->id
            )."'
        ";
        $oTriggerList = TdbPkgShopPaymentIpnTriggerList::GetList($query);
        if (0 === $oTriggerList->Length()) {
            return;
        }

        while ($oTrigger = $oTriggerList->Next()) {
            $oTriggerAction = TdbPkgShopPaymentIpnMessageTrigger::GetNewInstance();
            $aData = array(
                'pkg_shop_payment_ipn_trigger_id' => $oTrigger->id,
                'pkg_shop_payment_ipn_message_id' => $oMessage->id,
                'datecreated' => date('Y-m-d H:i:s'),
                'next_attempt' => date('Y-m-d H:i:s'),
            );
            $oTriggerAction->SaveFieldsFast($aData);
        }
    }
857363
protected function addBcc(Mail\Message $oMessage)
    {
        if (isset($this->aRendererConfig['mail_bcc']) && is_array($this->aRendererConfig['mail_bcc'])) {
            foreach ($this->aRendererConfig['mail_bcc'] as $sBccAddress) {
                // Avoid sending email copy to "to" AND bcc
                $bFound = false;
                foreach ($oMessage->getTo() as $oTo) {
                    if ($oTo->getEmail() == $sBccAddress) {
                        $bFound = true;
                        break;
                    }
                }
                if (!$bFound) {
                    $oAddressListBcc = new Mail\AddressList();
                    $oAddressListBcc->add(
                        new Mail\Address($sBccAddress)
                    );
                    $oMessage->addBcc($oAddressListBcc);
                }
            }
        }

        return $this;
    }
1053560
public function addMessage(Message $message): Email
    {
        if (null === $this->message->getBody()) {
            $this->message->setBody($message->getBody(), $message->getContentType());

            return $this;
        }

        $this->message->addPart($message->getBody(), $message->getContentType());

        return $this;
    }
496926
protected function getContentMessage($sHtml, $sPlain)
    {
        $oMessage = new Mime\Message();

        if ($sPlain != '') {
            $oPlain = new Mime\Part();
            $oPlain
                ->setContent($sPlain)
                ->setType(Mime\Mime::TYPE_TEXT)
                ->setCharset('UTF-8')
                ->setEncoding(Mime\Mime::ENCODING_QUOTEDPRINTABLE);

            $oMessage->addPart($oPlain);
        }

        if ($sHtml != '') {
            $oHtml = new Mime\Part();
            $oHtml
                ->setContent($sHtml)
                ->setType(Mime\Mime::TYPE_HTML)
                ->setCharset('UTF-8')
                ->setEncoding(Mime\Mime::ENCODING_QUOTEDPRINTABLE);

            $oMessage->addPart($oHtml);
        }

        return $oMessage;
    }
85390
public function logIPNResponse($sLevel, $sMessage, $oIpnMessage = null)
    {
        if ((bool)$this->getConfig()->getConfigParam('blAmazonLogging') !== true) {
            return;
        }

        $aContext = ($oIpnMessage !== null) ? array('ipnMessage' => $oIpnMessage) : array();
        $this->_getLogger()->log($sLevel, $sMessage, $aContext);
    }
225557
public function error($message, array $placeholders = [], $dismissible = true)
    {
        $this->message($message, null, $placeholders, 'error', $dismissible);

        return $this;
    }
311954
private function _sendNotification($aDiff, &$oRemoteApp, $aNewHistory)
        {

            // parse template
            $sHtml = $this->getContainer()->get('templating')->render('SlashworksAppBundle:Email:cron_notification.html.twig', array(
                'diff'       => $aDiff,
                'log'        => $aNewHistory['Log'],
                'remote_app' => $oRemoteApp,
                'controlurl' => $this->_getSiteURL()
            ));

            // get recipients
            $sRecipient = $oRemoteApp->getNotificationRecipient();
            // get sender
            $sSender = $oRemoteApp->getNotificationSender();

            // set subject and body of mail
            $sMessage = \Swift_Message::newInstance()->setSubject($this->getContainer()->get('translator')->trans('system.email.change.subject'))->setFrom($sSender)->setTo($sRecipient)->setContentType('text/html')->setBody($sHtml, 'text/html')->addPart($sHtml, 'text/html');

            // send email
            $this->getContainer()->get('mailer')->send($sMessage);
        }
298417
public function overlay($message, $title = 'Info', array $placeholders = [])
    {
        $this->message($message, $title, $placeholders, 'overlay', true, true);

        return $this;
    }
460547
protected function setError($msg)
    {
        $this->error_count++;
        if ($this->Mailer == 'smtp' and !is_null($this->smtp)) {
            $lasterror = $this->smtp->getError();
            if (!empty($lasterror) and array_key_exists('smtp_msg', $lasterror)) {
                $msg .= '<p>' . $this->lang('smtp_error') . $lasterror['smtp_msg'] . "</p>\n";
            }
        }
        $this->ErrorInfo = $msg;
    }
1250157
private function processLeadingIndentationTags ($sMessage)
    {
        $bTagFound = true;
        while ($bTagFound && strlen($sMessage) > 0) {
            if (substr($sMessage, 0, $this->iIndentTagLength) == $this->aConfig['indent_tag']) {
                $this->iIndentationLevel++;
                $sMessage = substr($sMessage, $this->iIndentTagLength);
            } elseif (substr($sMessage, 0, $this->iUnindentTagLength) == $this->aConfig['unindent_tag']) {
                $this->iIndentationLevel = max(0, $this->iIndentationLevel-1);
                $sMessage = substr($sMessage, $this->iUnindentTagLength);
            } else {
                $bTagFound = false;
            }
        }
        return $sMessage;
    }
1268549
public function setMainMessage(string $message, bool $translate = true) {
        $this->mainMessage = $translate ? $this->translate($message) : $message;
        return $this;
    }
562227
public function RemoveVoucher($sBasketVoucherKey, $sMessageHandler)
    {
        $bRemoved = $this->GetActiveVouchers()->RemoveItem('sBasketVoucherKey', $sBasketVoucherKey);
        $oMessageManager = TCMSMessageManager::GetInstance();
        if ($bRemoved) {
            $oMessageManager->AddMessage($sMessageHandler, 'VOUCHER-REMOVED');
            $this->SetBasketRecalculationFlag();
        } else {
            $oMessageManager->AddMessage($sMessageHandler, 'VOUCHER-ERROR-NOT-FOUND');
        }

        return $bRemoved;
    }
907427
function(oRm, oMessageNotifier, oNotiBar) {
			if (oMessageNotifier.hasItems()) {
				var aMessages = oMessageNotifier.getMessages();
				var lastItem = aMessages[aMessages.length - 1];

				var oMA = oMessageNotifier._oMessageArea;
				// this ensures that this message is selectable from the bar
				oMA._message = lastItem;
				var sId = oNotiBar.getId() + "-inplaceMessage-" + oMA._message.getId();

				oRm.write("<li");
				oRm.writeAttribute("id", sId);
				oRm.addClass("sapUiInPlaceMessage");
				oRm.writeClasses();

				if (oNotiBar._gapMessageArea) {
					var sMargin = oNotiBar._gapMessageArea + "px";
					oRm.addStyle("margin-left", sMargin);
					oRm.writeStyles();
				}
				oRm.write(">");

				// oRm.renderControl(oMA);
				if (lastItem.getText() != "") {
					oRm.write("<div");
					oRm.writeControlData(oMA);
					// enable inplace message for item navigation
					oRm.writeAttribute("tabindex", "-1");
					oRm.addClass("sapUiNotifierMessageText");
					oRm.addClass("sapUiInPlaceMessage");
					// if the latest message is read-only don't provide a visual selectable link
					if (oMessageNotifier._bEnableMessageSelect && !oMA._message.getReadOnly()) {
						// if there is an event handler show the inplace message
						// clickable
						oRm.addClass("sapUiInPlaceMessageSelectable");
					}
					oRm.writeClasses();
					oRm.write(">");
					oRm.writeEscaped(lastItem.getText());
					oRm.write("</div>"); // Text
				}

				if (lastItem.getTimestamp() != "") {
					oRm.write("<div");
					oRm.addClass("sapUiNotifierMessageTimestamp");
					oRm.addClass("sapUiInPlaceMessage");
					oRm.writeClasses();
					oRm.write(">");
					oRm.writeEscaped(lastItem.getTimestamp());
					oRm.write("</div>"); // Timestamp
				}

				oRm.write("</li>");
			}
		}
995786
public function addRule($rule, $method = null, $params = [], $message = null)
    {

        // construction des paramètres
        array_unshift($params, $rule, $method);

        call_user_func_array([$this->getValidator(), 'addRule'], $params);

        if (!is_null($message)) {
            if(is_array($message)){
                foreach($message as $rule => $message){
                    $this->getValidator()->addMessage($rule, $message);
                }
            }else{
                $this->getValidator()->addMessage($rule, $message);
            }
        }

        return $this;
    }
1325976
function(oThis, oMN) {
			if (oMN && oMN.hasItems()) {
				var $messageCount = oMN.$("counter");

				// remove all possible classes
				$messageCount.removeClass("sapUiMessageInformation");
				$messageCount.removeClass("sapUiMessageSuccess");
				$messageCount.removeClass("sapUiMessageWarning");
				$messageCount.removeClass("sapUiMessageError");

				// re-sort the messages and re-calc the severity level because they could have been changed
				// if the NotiBar was invisible
				fnSortMessages(oThis, oMN);
				// add new corresponding class
				var sLvl = oThis._sSeverestMessageLevel;
				$messageCount.addClass("sapUiMessage" + sLvl);

				// create key for description text
				var iCount = oMN.getMessages().length;
				var sKey = "NOTIBAR_MESSAGE_NOTIFIER_DESC_LEVEL_" + sLvl.toUpperCase() + (iCount === 1 ? "_SING" : "_PL");

				// set description (i.e. "3 messages available: Highest severity
				// "Error")
				fnSetNotifierDescription(oThis, oMN, sKey, iCount);
			}
		}
862267
function addMessage($rule, $message, $element = null) {
        $this->messages[$rule . ($element ? '.' . $element : '')] = $message;

        return $this;
    }