简体   繁体   中英

Quarkus - no error but no email (with gmail)

i'm trying to send email with quarkus with this guide https://quarkus.io/guides/mailer#gmail-specific-configuration .

I use this code :

@Inject
Mailer mailer;

@GET
public Response sendMailTest() {
   mailer.send(Mail.withHtml("<mail gmail>", "A simple email from quarkus", "<p>This is my body.<p>"));
   return Response.accepted().build();
}

with this parameters :

quarkus.mailer.auth-methods=DIGEST-MD5 CRAM-SHA256 CRAM-SHA1 CRAM-MD5 PLAIN LOGIN
quarkus.mailer.from=<mail gmail>
quarkus.mailer.host=smtp.gmail.com
quarkus.mailer.port=465
quarkus.mailer.ssl=true
quarkus.mailer.username=<mail gmail>
quarkus.mailer.password=<app gmail password>

I haven't some error but i haven't some mail. The app password gmail has configured for this usecase ...

Anybody has any idea ?

Thanks !

Did you read this ?

quarkus.mailer.mock

Enables the mock mode, not sending emails. The content of the emails is printed on the console. Disabled by default on PROD, enabled by default on DEV and TEST modes.

Have you tested this by running your app as a standalone jar ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM