Exemplo n.º 1
0
    public function emailText($format, $email, $name = null)
    {
        if (!$name) {
            // any false value can't be name
            $name = $recipient = $email;
        } else {
            $recipient = $name . ' (' . $email . ')';
        }
        if ($format === 'html') {
            return '<html>
			<head></head>
			<body>
			<div style="font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000000">
			<p>Hi ' . $name . ',</p>
			<p>Many thanks for your message. We will be in touch shortly.</p>
			</div>
				' . EmailHelper::signature() . '

				' . EmailHelper::disclaimer($recipient) . '
			</body>
			</html>';
        } else {
            return 'Hi ' . $name . ',
			Many thanks for your message. We will be in touch shortly.

				' . EmailHelper::signature(EmailHelper::TYPE_TEXT) . '

				' . EmailHelper::disclaimer($recipient, EmailHelper::TYPE_TEXT);
        }
    }
Exemplo n.º 2
0
    public function emailText($format, $email, $name = null, $viewing = true)
    {
        if (!$name) {
            // any false value can't be name
            $name = $recipient = $email;
        } else {
            $recipient = $name . ' (' . $email . ')';
        }
        /** @var $officeData Office[] */
        if ($format === 'html') {
            $contactUsText = '<p>Contact our ' . $this->deal->branch->bra_title . ' office on ' . $this->deal->branch->bra_tel . '</p>
							<p>' . $this->deal->dea_strapline . '<br />' . $this->deal->property->address->getLine(3) . ', ' . $this->deal->property->getFirstPostcodePart() . '<br />' . Locale::formatPrice($this->deal->dea_marketprice, $this->deal->dea_type == 'sales' ? false : true) . '<br />
							<a href="http://' . Yii::app()->params['hostname'] . '/details/' . $this->deal->dea_id . '">' . Yii::app()->params['hostname'] . '/details/' . $this->deal->dea_id . '</a></p>
							</span>';
            if ($viewing) {
                return '<html>
				<head></head>
				<body>
				<span style="font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000000">
				<p>Hi ' . $name . ',</p>
				<p>Many thanks for your interest. We will be getting back to you shortly to confirm your viewing. Please do call us at any time if you would like to speak to a negotiator to discuss your requirements further.</p>
				' . $contactUsText . '
				<p>Kind Regards,<br>Wooster & Stock</p>
				' . EmailHelper::signature() . '

				' . EmailHelper::disclaimer($recipient);
            } else {
                return '<span style="font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000000">
				<p>Hi ' . $name . ',</p>
				<p>Many thanks for your interest. We will let you know if this property comes back on the market. Please do call us at any time if you would like to speak to a negotiator to discuss your requirements further.</p>
				' . $contactUsText . '
				<p>Kind Regards,<br>Wooster & Stock</p>
				' . EmailHelper::signature() . '

				' . EmailHelper::disclaimer($recipient);
            }
        } else {
            if ($viewing) {
                return 'Hi ' . $name . ',

							Many thanks for your interest. We will be getting back to you shortly to confirm your viewing. Please do call us at any
							time if you would like to speak to a negotiator to discuss your requirements further.

							Contact our ' . $this->deal->branch->bra_title . ' office on ' . $this->deal->branch->bra_tel . '

							' . $this->deal->dea_strapline . '
							' . $this->deal->property->address->getLine(3) . ', ' . $this->deal->property->getFirstPostcodePart() . '
							' . Locale::formatPrice($this->deal->dea_marketprice, $this->deal->dea_type == 'sales' ? false : true) . '<br />
							' . Yii::app()->params['hostname'] . '/details/' . $this->deal->dea_id . '

							' . EmailHelper::signature(EmailHelper::TYPE_TEXT) . '

							' . EmailHelper::disclaimer($recipient, EmailHelper::TYPE_TEXT);
            } else {
                return 'Hi ' . $name . ',

				Many thanks for your interest. We will let you know if this property comes back on the market. Please do call us at any
				time if you would like to speak to a negotiator to discuss your requirements further.

				Contact our ' . $this->deal->branch->bra_title . ' office on ' . $this->deal->branch->bra_tel . '

				' . $this->deal->dea_strapline . '
				' . $this->deal->property->address->getLine(3) . ', ' . $this->deal->property->getFirstPostcodePart() . '
				' . Locale::formatPrice($this->deal->dea_marketprice, $this->deal->dea_type == 'sales' ? false : true) . '<br />
				' . Yii::app()->params['hostname'] . '/details/' . $this->deal->dea_id . '
				' . EmailHelper::signature(EmailHelper::TYPE_TEXT) . '

				' . EmailHelper::disclaimer($recipient, EmailHelper::TYPE_TEXT);
            }
        }
    }