Build the mail representation of the notification.

@param  mixed  $notifiable
@return \Illuminate\Notifications\Messages\MailMessage
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.');
    }
60216
public function send($notifiable, $item)
    {
        return (new MailMessage())
            ->line($this->getMessage($item))
            ->from(
                config('tddd.notifications.from.address'),
                config('tddd.notifications.from.name')
            )
            ->action($this->getActionTitle(), $this->getActionLink());
    }
102352
protected function sourcePath($notifiable) //while refactoring
    {
        if ($notifiable->isAdmin()) {
            return route('orders.show_seller_order', $this->order);
        }

        return route('orders.show_order', $this->order);
    }
36441
public function toMail($notifiable): MailMessage
    {
        return (new MailMessage())
            ->subject(trans('cortex/auth::emails.register.welcome.subject'))
            ->line(config('cortex.auth.registration.moderated')
                ? trans('cortex/auth::emails.register.welcome.intro_moderation')
                : trans('cortex/auth::emails.register.welcome.intro_default')
            );
    }
531461
public function push($notification, $notifiable)
    {
        if ( ! is_array($notifiable) && ! $notifiable instanceof Traversable) {
            $notifiable = [$notifiable];
        }

        foreach ($notifiable as $toBeNotified) {
            if ( ! $toBeNotified instanceof Notifiable && !$toBeNotified instanceof NotifiableGroup) {
                throw new NotNotifiableException("The notifiable members must implement the notifiable interface.");
            }
        }

        $notification = is_string($notification) ? ['body' => $notification] : $notification;

        foreach ($notifiable as $toBeNotified) {
            $this->pushNotification($notification, $toBeNotified);
        }
    }
90394
public function toMail($notifiable)
    {
        return (new MailMessage)
            ->error()
            ->subject($this->getSubject())
            ->line($this->getMessageText());
    }
450525
public function toMail($notifiable)
    {
        $email = $notifiable->getEmailForEmailVerification();
        $link = route('verifyEmailLink', ['email' => $email, 'expiration' => $this->expiration, 'token' => $this->token]);
        return (new MailMessage)
            ->subject(trans('emailverification::messages.resend.title'))
            ->line(trans('emailverification::messages.email.welcome'))
            ->line(trans('emailverification::messages.email.instructions'))
            ->action(trans('emailverification::messages.email.action'), $link);
    }
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
            ));
    }
946426
public function toMail($notifiable)
    {
        // check if Chronos path or app
        $request = \Route::getCurrentRequest();
        $reset_url = $request->is('admin/*') || $request->is('admin/*') ? route('chronos.auth.password_reset_form', $this->token) : url('password/reset', $this->token);

        return (new MailMessage)
            ->line('You are receiving this email because we received a password reset request for your account.')
            ->action('Reset Password', $reset_url)
            ->line('If you did not request a password reset, no further action is required.');
    }
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());
    }
595898
public function send(string $notifiable, Notification $notification)
    {
        $channelResult = $notification->toMail($notifiable);
        $messages = is_array($channelResult) ? $channelResult : [$channelResult];

        foreach ($messages as $message) {
            if (! $message instanceof Message) {
                throw new \Exception("Message needs to be an instance of craft\mail\Message");
            }

            $message->send();
        }
    }
387656
public function toMail($notifiable)
    {
        $url     = route('auth.invitation.activate', [$notifiable->getInvitationToken()->token]);
        $appName = config('app.name');

        return (new MailMessage)
            ->greeting('You have been invited to join ' . $appName . '!')
            ->line('Please click the button below to activate your account.')
            ->action('Verify your email', $url)
            ->line('We look forward to seeing you soon!');
    }
1304451
public function send($notifiable, Notification $notification)
    {
        $client = new SmsClient($this->endPoint, $this->token);
        $payload = $notification->toMMSms($notifiable);
        
        $client->send($payload);
    }
584123
public function via($notifiable)
    {
        return array_filter([
            Horizon::$slackWebhookUrl ? 'slack' : null,
            Horizon::$smsNumber ? 'nexmo' : null,
            Horizon::$email ? 'mail' : null,
        ]);
    }
85643
public function toMail($notifiable): MailMessage
    {
        if (static::$toMailCallback) {
            return call_user_func(static::$toMailCallback, $notifiable);
        }

        $email = $notifiable->getEmailForVerification();
        $link = route('managerarea.verification.email.verify')."?email={$email}&expiration={$this->expiration}&token={$this->token}";

        return (new MailMessage())
            ->subject(trans('cortex/auth::emails.verification.email.subject'))
            ->line(trans('cortex/auth::emails.verification.email.intro', ['expire' => now()->createFromTimestamp($this->expiration)->diffForHumans()]))
            ->action(trans('cortex/auth::emails.verification.email.action'), $link)
            ->line(trans('cortex/auth::emails.verification.email.outro', ['created_at' => now(), 'ip' => request()->ip(), 'agent' => request()->userAgent()]));
    }
931317
public function createNotificationAndNotify(NotifiableInterface $notifiable)
    {
        $userIds = $this->getUsersToNotifyForNotifiable($notifiable);

        $notification = null;
        if (count($userIds) > 0) {
            $resourceId = null;
            if (null !== $notifiable->getResource()) {
                $resourceId = $notifiable->getResource()->getId();
            }

            $notification = $this->createNotification(
                $notifiable->getActionKey(),
                $notifiable->getIconKey(),
                $resourceId,
                $notifiable->getNotificationDetails(),
                $notifiable->getDoer()
            );
            $this->notifyUsers($notification, $userIds);
        }

        return $notification;
    }
1134840
protected function messageBuilder($notifiable, $notification, $message)
    {
        return function ($mailMessage) use ($notifiable, $notification, $message) {
            $this->buildMessage($mailMessage, $notifiable, $notification, $message);
        };
    }