Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plain text email notification template #2581

Merged
merged 1 commit into from
Aug 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- [Formatting Mail Messages](#formatting-mail-messages)
- [Customizing The Recipient](#customizing-the-recipient)
- [Customizing The Subject](#customizing-the-subject)
- [Customizing The Template](#customizing-the-template)
- [Customizing The Templates](#customizing-the-templates)
- [Error Messages](#error-messages)
- [Database Notifications](#database-notifications)
- [Prerequisites](#database-prerequisites)
Expand Down Expand Up @@ -149,7 +149,7 @@ If a notification supports being sent as an email, you should define a `toMail`

> {tip} Note we are using `$this->invoice->id` in our `message` method. You may pass any data your notification needs to generate its message into the notification's constructor.

In this example, we register a line of text, a call to action, and then another line of text. These methods provided by the `MailMessage` object make it simple and fast to format small transactional emails. The mail channel will then translate the message components into a nice, responsive HTML email template. Here is an example of an email generated by the `mail` channel:
In this example, we register a line of text, a call to action, and then another line of text. These methods provided by the `MailMessage` object make it simple and fast to format small transactional emails. The mail channel will then translate the message components into a nice, responsive HTML email template with a plain text fallback. Here is an example of an email generated by the `mail` channel:

<img src="https://laravel.com/assets/img/notification-example.png" width="551" height="596">

Expand Down Expand Up @@ -199,9 +199,9 @@ By default, the email's subject is the class name of the notification formatted
}

<a name="customizing-the-template"></a>
### Customizing The Template
### Customizing The Templates

You can modify the template used by mail notifications by publishing the notification package's resources. After running this command, the mail notification template will be located in the `resources/views/vendor/notifications` directory:
You can modify the HTML and plain-text template used by mail notifications by publishing the notification package's resources. After running this command, the mail notification templates will be located in the `resources/views/vendor/notifications` directory:

php artisan vendor:publish --tag laravel-notifications

Expand Down