Build the mail representation of the notification.

@param  mixed  $notifiable
@return \Illuminate\Notifications\Messages\MailMessage
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));
    }
1304451
public function send($notifiable, Notification $notification)
    {
        $client = new SmsClient($this->endPoint, $this->token);
        $payload = $notification->toMMSms($notifiable);
        
        $client->send($payload);
    }
460496
public function toSlack($notifiable)
    {
        $content = trans('notifications.schedule.new.slack.content', [
            'name' => $this->schedule->name,
            'date' => $this->schedule->scheduled_at_formatted,
        ]);

        return (new SlackMessage())
                    ->content(trans('notifications.schedule.new.slack.title'))
                    ->attachment(function ($attachment) use ($content) {
                        $attachment->title($content)
                                   ->timestamp($this->schedule->getWrappedObject()->scheduled_at)
                                   ->fields(array_filter([
                                        'ID'     => "#{$this->schedule->id}",
                                        'Status' => $this->schedule->human_status,
                                    ]))
                                   ->footer(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
                    });
    }
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();
        }
    }
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));
        }
    }
382932
public function send($notifiable, Notification $notification)
    {
        $message = $notification->toSlack();

        $this->http->post($notifiable, $this->buildJsonPayload($message));
    }
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;
    }
703259
public function toMail($notifiable)
    {
        $mail = (new MailMessage())
            ->subject($this->subject)
            ->markdown($this->template, [
                'subject'    => $this->subject,
                'content'    => $this->content,
                'link'       => $this->link,
                'link_label' => $this->link_label,
                'data'       => $this->data,
            ]);

        if ($this->cc) {
            $mail->cc($this->cc);
        }

        if ($this->bcc) {
            $mail->bcc($this->bcc);
        }

        if ($this->attachments) {
            if (is_array($this->attachments)) {
                foreach ($this->attachments as $attachment) {
                    $mail->attach($attachment);
                }
            } else {
                $mail->attach($this->attachments);
            }
        }

        return $mail;
    }
580525
public function toMail($notifiable)
    {
        $url = route('auth.password.confirm', [$notifiable->getPasswordResetToken()->token]);

        return (new MailMessage)
            ->subject('Welcome to '. config('app.name') .'!')
            ->line('An account was created for you at '. config('app.name'))
            ->action('Set your password', $url)
            ->line('If you did not request an account, no further action is required.');
    }
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!');
    }
189623
public function toMail($notifiable)
    {
        $link = route('user.activate', $this->token);
        return (new MailMessage)
            ->subject('Activate your Account')
            ->line('Welcome to ' . config('app.name'))
            //->action('Notification Action', 'https://laravel.com')
            ->action('Activation Link', $link)
            ->line('We hope you will have a good experience');
    }
622703
public function toSlack($notifiable)
    {
        return (new SlackMessage)
                    ->from('Laravel Horizon')
                    ->to(Horizon::$slackChannel)
                    ->image('https://laravel.com/assets/img/horizon-48px.png')
                    ->error()
                    ->content('Oh no! Something needs your attention.')
                    ->attachment(function ($attachment) {
                        $attachment->title('Long Wait Detected')
                                   ->content(sprintf(
                                        '[%s] The "%s" queue on the "%s" connection has a wait time of %s seconds.',
                                       config('app.name'), $this->longWaitQueue, $this->longWaitConnection, $this->seconds
                                   ));
                    });
    }
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'));
    }
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'));
    }
159089
public function toMail($notifiable)
    {
        return (new MailMessage)
            ->subject(trans('authentication-log::messages.subject'))
            ->markdown('authentication-log::emails.new', [
                'account' => $notifiable,
                'time' => $this->authenticationLog->login_at,
                'ipAddress' => $this->authenticationLog->ip_address,
                'browser' => $this->authenticationLog->user_agent,
            ]);
    }
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());
    }
60084
public function toSlack($notifiable)
    {
        return (new SlackMessage())
            ->error()
            ->from(
                config('health.notifications.from.name'),
                config('health.notifications.from.icon_emoji')
            )
            ->content($this->getMessage())
            ->attachment(function ($attachment) {
                $attachment
                    ->title($this->getActionTitle(), $this->getActionLink())
                    ->content($this->result->errorMessage);
            });
    }