Get the mail representation of the notification.

@param  mixed $notifiable
@return \Illuminate\Notifications\Messages\MailMessage
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)));
    }
800580
public function generateIdentifier(NotifiableInterface $notifiable)
    {
        $Notifiableidentifiers = $this->getNotifiableIdentifier($notifiable);
        $identifierValues = array();
        foreach ($Notifiableidentifiers as $identifier) {
            $method = sprintf('get%s', ucfirst($identifier));
            $identifierValues[] = $notifiable->$method();
        }

        return implode('-', $identifierValues);
    }
125684
public function send($notifiable, Notification $notification)
    {
        try {
            $to = $this->getTo($notifiable);
            $message = $notification->toTwilio($notifiable);
            $useSender = $this->canReceiveAlphanumericSender($notifiable);

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

            if (! $message instanceof TwilioMessage) {
                throw CouldNotSendNotification::invalidMessageObject($message);
            }

            return $this->twilio->sendMessage($message, $to, $useSender);
        } catch (Exception $exception) {
            $event = new NotificationFailed($notifiable, $notification, 'twilio', ['message' => $exception->getMessage(), 'exception' => $exception]);
            if (function_exists('event')) { // Use event helper when possible to add Lumen support
                event($event);
            } else {
                $this->events->fire($event);
            }
        }
    }
1080262
public function toDatabase($notifiable)
    {
        return [
            'message' => $this->contactUs->fullname . ' submitted contact us.',
            'id'      => $this->contactUs->id,
            'type'    => get_class($this->contactUs),
        ];
    }
468406
protected function verificationUrl($notifiable)
    {
        return URL::temporarySignedRoute(
            'verification.verify',
            Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),
            ['id' => $notifiable->getKey()]
        );
    }
830744
public function toSlack($notifiable)
    {
        $content = trans('notifications.incident.update.slack.content', [
            'name'       => $this->update->incident->name,
            'new_status' => $this->update->human_status,
        ]);

        $status = 'info';

        if ($this->update->status === Incident::FIXED) {
            $status = 'success';
        } elseif ($this->update->status === Incident::WATCHED) {
            $status = 'warning';
        } else {
            $status = 'error';
        }

        return (new SlackMessage())
                    ->$status()
                    ->content($content)
                    ->attachment(function ($attachment) use ($content, $notifiable) {
                        $attachment->title(trans('notifications.incident.update.slack.title', [
                                        'name'       => $this->update->incident->name,
                                        'new_status' => $this->update->human_status,
                                    ]))
                                   ->timestamp($this->update->getWrappedObject()->created_at)
                                   ->fields(array_filter([
                                        'ID'   => "#{$this->update->id}",
                                        'Link' => $this->update->permalink,
                                    ]))
                                   ->footer(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
                    });
    }
54929
protected function buildMessage($notifiable, Notification $notification)
    {
        $message = call_user_func_array([$notification, $this->getToMethod()], [$notifiable]);

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

        return $message;
    }
307162
public function send($notifiable, Notification $notification)
    {
        $notifiable->routeNotificationFor('database')->create([
            'id' => $notification->id,
            'type' => get_class($notification),
            'data' => $this->getData($notifiable, $notification),
            'read_at' => 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()]));
    }
745669
public function toMail($notifiable)
    {
        $message = new MailMessage();
        $message
            ->from(config('laravel2step.verificationEmailFrom'), config('laravel2step.verificationEmailFromName'))
            ->subject(trans('laravel2step::laravel-verification.verificationEmailSubject'))
            ->greeting(trans('laravel2step::laravel-verification.verificationEmailGreeting', ['username' => $this->user->name]))
            ->line(trans('laravel2step::laravel-verification.verificationEmailMessage'))
            ->line($this->code)
            ->action(trans('laravel2step::laravel-verification.verificationEmailButton'), route('laravel2step::verificationNeeded'));

        return $message;
    }
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),
        ]);
    }
1346228
public function toMail($notifiable)
    {
        return (new MailMessage)
            ->subject($this->subject)
            ->view($this->view, [
                'name' => $notifiable->fullName,
                'route' => $this->route($notifiable),
            ]);
    }
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');
    }
1022902
public function toMail($notifiable)
    {
        $content = 'A log on ' . url('/') . ' has been written to.';
        if($notifiable->filter !== '*') {
            $content .= " You're being notified because the log contains `" . $notifiable->filter . "`";
        }

        $status = 'success';
        foreach($this->notificationLevels as $triggerLevel => $childLevels) {
            if(in_array($this->requestInfo['level'], $childLevels)) {
                $status = $triggerLevel;
            }
        }

        $fields = array(
            'Level' => $this->requestInfo['level'],
            'Message' => $this->requestInfo['message']
        );

        if($this->requestInfo['user_id']) {
            $fields['User ID'] = $this->requestInfo['user_id'];
        }

        if($this->requestInfo['email']) {
            $fields['Associated Email'] = $this->requestInfo['email'];
        }

        $statusColors = array(
            'success' => '#00B945',
            'warning' => '#ff9f00',
            'error' => '#BC001A'
        );

        return (new MailMessage)
            ->subject(env('LARAMETRICS_LOG_SUBJECT', '[Larametrics Alert] The application log has been written to'))
            ->from(env('LARAMETRICS_FROM_EMAIL', 'alerts@larametrics.com'), env('LARAMETRICS_FROM_NAME', 'Larametrics Alerts'))
            ->view('larametrics::emails.log-written', [
                'requestInfo' => $this->requestInfo,
                'content' => $content,
                'alertColor' => $statusColors[$status]
            ]);
    }
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')
            );
    }
815239
public function toMail($notifiable)
    {
        $url = route('auth.activation.activate', [$notifiable->getActivationToken()->token]);

        return (new MailMessage)
            ->greeting('Thanks for registering!')
            ->line('Please click the button below to verify your account.')
            ->action('Verify your email', $url)
            ->line('Thank you for using our application!');
    }