Get the mail representation of the notification.

@param  mixed $notifiable
@return \Illuminate\Notifications\Messages\MailMessage
197818
public function toMail($notifiable)
    {
        $mailMessage = (new MailMessage)
            ->error()
            ->subject($this->getMessageText())
            ->line($this->getMessageText());

        foreach ($this->getMonitorProperties() as $name => $value) {
            $mailMessage->line($name.': '.$value);
        }

        return $mailMessage;
    }
422475
protected function getUsersToPullFor($notifiable)
    {
        foreach ($notifiable as $key => $toBeNotified) {
            if ( ! $toBeNotified instanceof Notifiable && ! $toBeNotified instanceof NotifiableGroup) {
                throw new NotNotifiableException("The members passed to the pull must implement the notifiable interface");
            }

            if ($toBeNotified instanceof NotifiableGroup) {
                $group = $toBeNotified->getGroup();

                if ($group instanceof Collection) {
                    $group = $group->all();
                }

                $notifiable = array_merge($notifiable, $group);

                unset($notifiable[$key]);
            }
        }

        return $notifiable;
    }
462779
public function toMail($notifiable)
    {
        return (new MailMessage())
            ->greeting('Hey '.$notifiable->name)
            ->line('You\'ve been given a new account on '.url('/'))
            ->line('EM: '.$notifiable->email)
            ->line('PW: '.$this->password)
            ->line('Click the link below to login')
            ->action('Login', url('login'));
    }
846999
public function toMail($notifiable)
    {
        $content = trans('notifications.schedule.new.mail.content', [
            'name' => $this->schedule->name,
            'date' => $this->schedule->scheduled_at_formatted,
        ]);

        return (new MailMessage())
            ->subject(trans('notifications.schedule.new.mail.subject'))
            ->markdown('notifications.schedule.new', [
                'content'                => $content,
                'unsubscribeText'        => trans('cachet.subscriber.unsubscribe'),
                'unsubscribeUrl'         => cachet_route('subscribe.unsubscribe', $notifiable->verify_code),
                'manageSubscriptionText' => trans('cachet.subscriber.manage_subscription'),
                'manageSubscriptionUrl'  => cachet_route('subscribe.manage', $notifiable->verify_code),
        ]);
    }
819813
public function toMail($notifiable)
    {
        $frontendReferer = parse_url(request()->headers->get('referer'));
        $frontendURL = $frontendReferer['scheme'] . '://' . $frontendReferer['host'];
        if ($frontendReferer['port']) {
            $frontendURL .= (':' . $frontendReferer['port']);
        }
        $frontendURL .= $frontendReferer['path'];
        $email = request()->get('email');
        $resetUrl = $frontendURL . '#/password/reset?email=' . $email . '&reset_token=' . $this->token;
        return (new MailMessage)
            ->line('You are receiving this email because we received a password reset request for your account.')
            ->action('Reset Password', $resetUrl)
            ->line('If you did not request a password reset, no further action is required.');
    }
584123
public function via($notifiable)
    {
        return array_filter([
            Horizon::$slackWebhookUrl ? 'slack' : null,
            Horizon::$smsNumber ? 'nexmo' : null,
            Horizon::$email ? 'mail' : null,
        ]);
    }
552480
public function toMail($notifiable)
    {
        return (new MailMessage)
            ->subject(config('coaster::site.name') . ': Forgotten Password')
            ->from(config('coaster::site.email'))
            ->line('You are receiving this email because we received a password reset request for your account.')
            ->action('Reset Password', url(route($this->_routeName, $this->_user->tmp_code)))
            ->line('If you did not request a password reset, no further action is required.');
    }
483407
public function toMail($notifiable)
    {
        return (new MailMessage)->subject('Contact Us')
            ->greeting("Dear {$notifiable->firstname}")
            ->line("The following information was submitted from the <strong>Contact Us</strong>.")
            ->line('&nbsp;')
            ->line("<strong>Contact Us Details</strong>")
            ->line("Fullname: {$this->contactUs->fullname}")
            ->line("Email: {$this->contactUs->email}")
            ->line("Phone: {$this->contactUs->phone}")
            ->line("Enquiry: {$this->contactUs->content}")
            ->action('View Contact Us Report', url('/admin/reports/contact-us'));
    }
207907
public function toMail($notifiable)
    {
        return (new MailMessage)
            ->subject(config('coaster::site.name') . ': New Account Details')
            ->from(config('coaster::site.email'))
            ->line('You have been created a new account on '.url()->to('/').' please see details below:')
            ->line('Username: ' . $this->_user->email)
            ->line('Password: ' . $this->_password)
            ->action('Go to Login', url(route($this->_routeName)));
    }
7519
public function getNotificationCount(NotifiableInterface $notifiable)
    {
        return $this->notifiableNotificationRepository->getNotificationCount(
            $this->generateIdentifier($notifiable),
            ClassUtils::getRealClass(get_class($notifiable))
        );
    }
1048069
public function listAction($notifiable)
    {
        $notifiableRepo = $this->get('doctrine.orm.entity_manager')->getRepository('MgiletNotificationBundle:NotifiableNotification');
        $notificationList = $notifiableRepo->findAllForNotifiableId($notifiable);
        return $this->render('@MgiletNotification/notifications.html.twig', array(
            'notificationList' => $notificationList,
            'notifiableNotifications' => $notificationList // deprecated: alias for backward compatibility only
        ));
    }
354444
public function toMail($notifiable)
    {
        return (new MailMessage())
            ->line($this->getMessage($notifiable))
            ->from(
                config('health.notifications.from.address'),
                config('health.notifications.from.name')
            )
            ->action($this->getActionTitle(), $this->getActionLink());
    }
978582
public function toMail($notifiable)
    {
        return (new MailMessage)
            ->greeting('Hey '.$notifiable->name)
            ->line('You have a brand new account on '.url('/'))
            ->line('But, you are receiving this email because we need you to activate your account.')
            ->action('Activate Account', url('activate/token', $this->token));
    }
934531
public function renderNotifications(NotifiableInterface $notifiable, array $options)
    {
        $order = array_key_exists('order', $options) ? $options['order'] : null;
        $limit = array_key_exists('limit', $options) ? $options['limit'] : null;
        $offset = array_key_exists('offset', $options) ? $options['offset'] : null;

        if ($options['seen']) {
            $notifications = $this->notificationManager->getNotifications($notifiable, $order, $limit, $offset);
        } else {
            $notifications = $this->notificationManager->getUnseenNotifications($notifiable, $order, $limit, $offset);
        }

        // if the template option is set, use custom template
        $template = array_key_exists('template', $options) ? $options['template'] : '@MgiletNotification/notification_list.html.twig';

        return $this->twig->render($template,
            array(
                'notificationList' => $notifications
            )
        );
    }
1317707
public function toMail($notifiable)
    {
        if (static::$toMailCallback) {
            return call_user_func(static::$toMailCallback, $notifiable, $this->token);
        }

        $resetUrl = sprintf(
            '%s#/%s/%s/password/%s',
            str_finish(config('agencms.portal', 'https://portal.agencms.com/'), '/'),
            $this->tenant,
            $this->site,
            $this->token
        );

        return (new MailMessage)
            ->line('You have requested to reset your password.')
            ->action('Set Password', $resetUrl)
            ->line('If you did not request this, no further action is required.');
    }
732112
public function toMail($notifiable)
    {
        return (new MailMessage)
            ->error()
            ->subject(config('app.name').': Long Queue Wait Detected')
            ->greeting('Oh no! Something needs your attention.')
            ->line(sprintf(
                 'The "%s" queue on the "%s" connection has a wait time of %s seconds.',
                $this->longWaitQueue, $this->longWaitConnection, $this->seconds
            ));
    }
1115628
public function toMail($notifiable)
    {
        $content = trans('notifications.incident.new.mail.content', [
            'name' => $this->incident->name,
        ]);

        return (new MailMessage())
                    ->subject(trans('notifications.incident.new.mail.subject'))
                    ->markdown('notifications.incident.new', [
                        'incident'               => $this->incident,
                        'content'                => $content,
                        'actionText'             => trans('notifications.incident.new.mail.action'),
                        'actionUrl'              => cachet_route('incident', [$this->incident]),
                        'unsubscribeText'        => trans('cachet.subscriber.unsubscribe'),
                        'unsubscribeUrl'         => cachet_route('subscribe.unsubscribe', $notifiable->verify_code),
                        'manageSubscriptionText' => trans('cachet.subscriber.manage_subscription'),
                        'manageSubscriptionUrl'  => cachet_route('subscribe.manage', $notifiable->verify_code),
                    ]);
    }