silverstripe-userforms/code/Model/Recipient/UserFormRecipientEmail.php

39 lines
840 B
PHP
Raw Normal View History

2015-07-24 14:37:48 +12:00
<?php
namespace SilverStripe\UserForms\Model\Recipient;
use SilverStripe\Control\Email\Email;
2015-07-24 14:37:48 +12:00
/**
* Email that gets sent to the people listed in the Email Recipients when a
* submission is made.
*
* @package userforms
*/
2016-07-21 17:53:59 +12:00
class UserFormRecipientEmail extends Email
{
protected $ss_template = 'SubmittedFormEmail';
2015-07-24 14:37:48 +12:00
2016-07-21 17:53:59 +12:00
protected $data;
2015-07-24 14:37:48 +12:00
2016-07-21 17:53:59 +12:00
public function __construct($submittedFields = null)
{
parent::__construct($submittedFields = null);
}
2015-07-24 14:37:48 +12:00
2016-07-21 17:53:59 +12:00
/**
* Set the "Reply-To" header with an email address rather than append as
* {@link Email::replyTo} does.
*
* @param string|array $address
* @param string|null $name
* @return $this
2016-07-21 17:53:59 +12:00
*/
public function setReplyTo($address, $name = null)
2016-07-21 17:53:59 +12:00
{
$this->customHeaders['Reply-To'] = $email;
return $this;
2016-07-21 17:53:59 +12:00
}
2015-07-24 14:37:48 +12:00
}