Create Mail message.

@param $notifiable
@return MailMessage
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());
    }
244345
protected function formatNotifiables($notifiables)
    {
        if ((! $notifiables instanceof Collection) && ! is_array($notifiables)) {
            $items = array($notifiables);

            if ($notifiables instanceof Model) {
                return new ModelCollection($items);
            }

            return $items;
        }

        return $notifiables;
    }
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));
    }
966935
public function send($notifiables, $notification)
    {
        return (new NotificationSender(
            $this, $this->app->make(Bus::class), $this->app->make(Dispatcher::class), $this->locale)
        )->send($notifiables, $notification);
    }
878181
public function toMail($notifiable)
    {
        return (new MailMessage)
                ->error()
                ->subject('Failed Login Notification')
                ->greeting('Account Login Failed!')
                ->line('A failed login was detected for your account.')
                ->line('This request originated from ' . $this->ip . ' (' . gethostbyaddr($this->ip) . ') at ' . $this->time);
    }
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
            )
        );
    }
1340268
public function send($notifiable, Notification $notification)
    {
        if (! $notifiable->routeNotificationFor('mail')) {
            return;
        }

        $message = $notification->toMail($notifiable);

        $this->mailer->send($message->view, $message->data(), function ($m) use ($notifiable, $notification, $message) {
            $recipients = $notifiable->routeNotificationFor('mail');

            if (is_array($recipients)) {
                $m->bcc($recipients);
            } else {
                $m->to($recipients);
            }

            $m->subject($message->subject ?: Str::title(
                Str::snake(class_basename($notification), ' ')
            ));

            foreach ($message->attachments as $attachment) {
                $m->attach($attachment['file'], $attachment['options']);
            }

            foreach ($message->rawAttachments as $attachment) {
                $m->attachData($attachment['data'], $attachment['name'], $attachment['options']);
            }
        });
    }
1112494
public function toMail($notifiable)
    {
        if (static::$toMailCallback) {
            return call_user_func(static::$toMailCallback, $notifiable, $this->token);
        }

        return (new MailMessage)
            ->subject(Lang::getFromJson('Reset Password Notification'))
            ->line(Lang::getFromJson('You are receiving this email because we received a password reset request for your account.'))
            ->action(Lang::getFromJson('Reset Password'), url(config('app.url').route('password.reset', ['token' => $this->token], false)))
            ->line(Lang::getFromJson('This password reset link will expire in :count minutes.', ['count' => config('auth.passwords.users.expire')]))
            ->line(Lang::getFromJson('If you did not request a password reset, no further action is required.'));
    }
765894
public function toNexmo($notifiable)
    {
        $content = trans('notifications.component.status_update.sms.content', [
            'name'       => $this->component->name,
            'old_status' => $this->component->human_status,
            'new_status' => trans("cachet.components.status.{$this->status}"),
        ]);

        return (new NexmoMessage())->content($content);
    }
1029038
public function toMail($notifiable)
    {
        $mail = (new MailMessage)
                    ->line($this->intro)
                    ->subject($this->subject);

        if ($this->confirmation) {
            $mail->replyTo($this->replyTo[0], $this->replyTo[1]);
        }

        $mail->viewData = [
                'rawText' => $this->createSubmissionEmail($this->submission),
                'rawTextPlain' => $this->createSubmissionEmailPlain($this->submission)
            ];

        return $mail;
    }
926322
protected function pushNotification($notification, $notifiable)
    {
        if ($notifiable instanceof NotifiableGroup) {
            foreach ($notifiable->getGroup() as $toBeNotified) {
                $this->push($notification, $toBeNotified);
            }
        } else {
            // @todo Change this fucking shite
            $notification = $notifiable->notifications()->create($notification);

            event(new NotificationAdded($notification, $notifiable));
        }
    }
959829
public function toMail($notifiable)
    {
        $content = trans('notifications.incident.update.mail.content', [
            'name'    => $this->update->incident->name,
            'time'    => $this->update->created_at_diff,
        ]);

        return (new MailMessage())
            ->subject(trans('notifications.incident.update.mail.subject'))
            ->markdown('notifications.incident.update', [
                'incident'               => $this->update->incident,
                'update'                 => $this->update,
                'content'                => $content,
                'actionText'             => trans('notifications.incident.new.mail.action'),
                'actionUrl'              => cachet_route('incident', [$this->update->incident]),
                'incidentName'           => $this->update->incident->name,
                'newStatus'              => $this->update->human_status,
                '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),
        ]);
    }
953740
public function send($notifiable, Notification $notification)
    {
        if (! $to = $notifiable->routeNotificationFor('nexmo')) {
            return;
        }

        $message = $notification->toNexmo($notifiable);

        if (is_string($message)) {
            $message = new NexmoMessage($message);
        }

        $this->nexmo->message()->send([
            'from' => $message->from ?: $this->from,
            'to' => $to,
            'text' => trim($message->content),
        ]);
    }
310184
public function toMail($notifiable)
    {
        if (static::$toMailCallback) {
            return call_user_func(static::$toMailCallback, $notifiable);
        }

        return (new MailMessage)
            ->subject(Lang::getFromJson('Verify Email Address'))
            ->line(Lang::getFromJson('Please click the button below to verify your email address.'))
            ->action(
                Lang::getFromJson('Verify Email Address'),
                $this->verificationUrl($notifiable)
            )
            ->line(Lang::getFromJson('If you did not create an account, no further action is required.'));
    }
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)));
    }
981546
public function send($notifiable, Notification $notification)
    {
        if (! $url = $notifiable->routeNotificationFor('slack')) {
            return;
        }

        $message = $notification->toSlack($notifiable);

        $this->http->post($url, [
            'json' => [
                'text' => $message->content,
                'attachments' => $this->attachments($message),
            ],
        ]);
    }
317704
public function send($notifiable, Notification $notification)
    {
        $message = $notification->toMail($notifiable);

        if (! $notifiable->routeNotificationFor('mail', $notification) &&
            ! $message instanceof Mailable) {
            return;
        }

        if ($message instanceof Mailable) {
            return $message->send($this->mailer);
        }

        $this->mailer->send(
            $this->buildView($message),
            array_merge($message->data(), $this->additionalMessageData($notification)),
            $this->messageBuilder($notifiable, $notification, $message)
        );
    }