Skip to content

Commit

Permalink
Merge pull request #27920 from rsvoboda/mailer.doc.config
Browse files Browse the repository at this point in the history
  • Loading branch information
cescoffier authored Sep 14, 2022
2 parents b9e294e + 1dec905 commit c19be6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
4 changes: 4 additions & 0 deletions docs/src/main/asciidoc/mailer-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@ quarkus.mailer.port=587
quarkus.mailer.start-tls=REQUIRED
[email protected]
quarkus.mailer.password=YOURGENERATEDAPPLICATIONPASSWORD
quarkus.mailer.mock=false # In dev mode, prevent from using the mock SMTP server
----

Or with SSL:
Expand All @@ -381,6 +383,8 @@ quarkus.mailer.port=465
quarkus.mailer.ssl=true
[email protected]
quarkus.mailer.password=YOURGENERATEDAPPLICATIONPASSWORD
quarkus.mailer.mock=false # In dev mode, prevent from using the mock SMTP server
----

[NOTE]
Expand Down
24 changes: 1 addition & 23 deletions docs/src/main/asciidoc/mailer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -181,32 +181,10 @@ In the `src/main/resources/application.properties` file, you need to configure t
Note that the password can also be configured using system properties and environment variables.
See the xref:config-reference.adoc[configuration reference guide] for details.

Here is an example using _sendgrid_:

[source,properties]
----
# Your email address you send from - must match the "from" address from sendgrid.
[email protected]
# The SMTP host
quarkus.mailer.host=smtp.sendgrid.net
# The SMTP port
quarkus.mailer.port=465
# If the SMTP connection requires SSL/TLS
quarkus.mailer.ssl=true
# Your username
quarkus.mailer.username=....
# Your password
quarkus.mailer.password=....
# By default, in dev mode, the mailer is a mock. This disables the mock and use the configured mailer.
quarkus.mailer.mock=false
----
Configuration of popular mail services is covered in xref:mailer-reference.adoc#popular[the reference guide].

Once you have configured the mailer, if you call the HTTP endpoint as shown above, you will send emails.

Other popular mail services are covered in xref:mailer-reference.adoc#popular[the reference guide].

== Conclusion

This guide has shown how to send emails from your Quarkus application.
Expand Down

0 comments on commit c19be6d

Please sign in to comment.