-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,7 +99,7 @@ file. However, you may use the `mailer()` method to send a message | |
using a specific mailer configuration: | ||
|
||
```typescript | ||
await Mail.mailer('my-mailer') | ||
await Mail.mailer('my-mailer') π | ||
.from('[email protected]') | ||
.to('[email protected]') | ||
.text('Mail content') | ||
|
@@ -115,7 +115,7 @@ method: | |
await Mail.mailer('my-mailer') | ||
.from('[email protected]') | ||
.to('[email protected]') | ||
.html('<h1>Mail content</h1>') | ||
.html('<h1>Mail content</h1>') π | ||
.send() | ||
``` | ||
|
||
|
@@ -125,7 +125,7 @@ And for markdowns you can use the `markdown()` method: | |
await Mail.mailer('my-mailer') | ||
.from('[email protected]') | ||
.to('[email protected]') | ||
.markdown('# Mail content') | ||
.markdown('# Mail content') π | ||
.send() | ||
``` | ||
|
||
|
@@ -140,7 +140,7 @@ const userEmail = '[email protected]' | |
|
||
await Mail.from('[email protected]') | ||
.to(userEmail) | ||
.view('mail/welcome', { email: userEmail }) | ||
.view('mail/welcome', { email: userEmail }) π | ||
.send() | ||
``` | ||
|
||
|
@@ -149,20 +149,10 @@ await Mail.from('[email protected]') | |
When designing a mailable's template, it is convenient to quickly | ||
preview the rendered mailable in your browser like a typical | ||
Edge template. For this reason, Athenna allows you to return any | ||
mailable directly from a route closure or controller by using the | ||
`response.view()` method, allowing you to quickly preview its | ||
design without needing to send it to an actual email address: | ||
mailable directly from a route using the `Route.view()` method, | ||
allowing you to quickly preview its design without needing to | ||
send it to an actual email address: | ||
|
||
```typescript title="Path.routes('http.ts')" | ||
Route.get('/mailable', ({ response }) => { | ||
return response.view('mail.welcome', { email: '[email protected]' }) | ||
}) | ||
Route.view('/mailable', 'mail.welcome', { email: '[email protected]' }) | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|