-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(sample-app): intent command for testing out mailers
- Loading branch information
Showing
6 changed files
with
42 additions
and
8 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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Command, ConsoleIO, log, Mail, MailMessage } from '@intentjs/core'; | ||
|
||
@Command('test:mail', { desc: 'Command to test the log' }) | ||
export class TestMailConsoleCommand { | ||
async handle(_cli: ConsoleIO) { | ||
log('Sending out email'); | ||
const mail3 = MailMessage.init() | ||
.greeting('Hey there') | ||
.line('We received your request to reset your account password.') | ||
.button('Click here to reset your password', 'https://google.com') | ||
.line('Alternative, you can also enter the code below when prompted') | ||
.inlineCode('ABCD1234') | ||
.line('Rise & Shine,') | ||
.line('V') | ||
.subject('Hey there from Intent'); | ||
await Mail.init().to('[email protected]').send(mail3); | ||
return true; | ||
} | ||
} |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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