Skip to content

Commit

Permalink
Merge pull request #39377 from gsmet/mailer-doc-adjustments
Browse files Browse the repository at this point in the history
Small doc adjustments for the Mailer guides
  • Loading branch information
gsmet authored Mar 13, 2024
2 parents 81a3a42 + 4cf4481 commit 9957021
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/src/main/asciidoc/mailer-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ Note that does not mean that the message is delivered, just that it's been sent

Because it is very inconvenient to send emails during development and testing, you can set the `quarkus.mailer.mock` boolean
configuration to `true` to prevent the actual sending of emails but instead print them on stdout and collect them in a `MockMailbox` bean instead.
This is the default if you are running Quarkus in `DEV` or `TEST` mode.
This is the default if you are running Quarkus in dev or test mode.

You can then write tests to verify that your emails were sent, for example, by a REST endpoint:

Expand Down Expand Up @@ -305,6 +305,9 @@ class MailTest {
}
----

Another option is to use the https://github.com/quarkiverse/quarkus-mailpit[Quarkus Mailpit] extension
which provides Dev Services for https://github.com/axllent/mailpit[Mailpit], a nice UI for testing and debugging email sending.

== Using the underlying Vert.x Mail Client

The Quarkus Mailer is implemented on top of the https://vertx.io/docs/vertx-mail-client/java/[Vert.x Mail Client], providing an asynchronous and non-blocking way to send emails.
Expand Down
8 changes: 7 additions & 1 deletion docs/src/main/asciidoc/mailer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ It prints it in the log, so you can check that what was about to be sent.
NOTE: This section used the _imperative_ mailer API.
It blocks the caller thread until the mail is sent.

[TIP]
====
The https://github.com/quarkiverse/quarkus-mailpit[Quarkus Mailpit] extension is very handy for testing emails.
It provides Dev Services for https://github.com/axllent/mailpit[Mailpit], a nice UI for testing and debugging email sending.
====

== Using the reactive mailer

The last section use the _imperative_ mailer.
Expand Down Expand Up @@ -223,7 +229,7 @@ The xref:mailer-reference.adoc[mailer reference guide] provides more details abo
* xref:mailer-reference.adoc#html[how to format the email as HTML and use inline attachments]
* xref:mailer-reference.adoc#templates[how to use Qute templates]
* xref:mailer-reference.adoc#testing[how to test applications sending emails]
* xref:mailer-reference.adoc#gmail-specific-configuration[how to configure the mailer to send emails with GMAIL]
* xref:mailer-reference.adoc#popular[how to configure the mailer for popular email services (e.g. Gmail, AWS SES)]



0 comments on commit 9957021

Please sign in to comment.