3 namespace Drupal\contact;
5 use Drupal\Core\Session\AccountInterface;
8 * Provides an interface for assembly and dispatch of contact mail messages.
10 interface MailHandlerInterface {
13 * Sends mail messages as appropriate for a given Message form submission.
15 * Can potentially send up to three messages as follows:
16 * - To the configured recipient;
17 * - Auto-reply to the sender; and
18 * - Carbon copy to the sender.
20 * @param \Drupal\contact\MessageInterface $message
21 * Submitted message entity.
22 * @param \Drupal\Core\Session\AccountInterface $sender
23 * User that submitted the message entity form.
25 * @throws \Drupal\contact\MailHandlerException
26 * When unable to determine message recipient.
28 public function sendMailMessages(MessageInterface $message, AccountInterface $sender);