Thank you very much for your recommendation. The Postfix SMTP configuration is much easier than Payara’s. However, I have resolved the issue by configuring it with the properties below:
server.resources.mail-resource.mail/notifyMailSession.auth=false
server.resources.mail-resource.mail/notifyMailSession.debug=false
server.resources.mail-resource.mail/notifyMailSession.deployment-order=100
server.resources.mail-resource.mail/notifyMailSession.enabled=true
server.resources.mail-resource.mail/notifyMailSession.host=smtp.gmail.com server.resources.mail-resource.mail/notifyMailSession.jndi-name=mail/notifyMailSession
server.resources.mail-resource.mail/notifyMailSession.object-type=user
server.resources.mail-resource.mail/notifyMailSession.store-protocol=imap
server.resources.mail-resource.mail/notifyMailSession.store-protocol-class=org.eclipse.angus.mail.imap.IMAPStore
server.resources.mail-resource.mail/notifyMailSession.transport-protocol=smtp
server.resources.mail-resource.mail/notifyMailSession.transport-protocol-class=org.eclipse.angus.mail.smtp.SMTPTransport
server.resources.mail-resource.mail/notifyMailSession.property.mail.smtp.port=465
server.resources.mail-resource.mail/notifyMailSession.property.mail.smtp.auth=true
server.resources.mail-resource.mail/notifyMailSession.property.mail.smtp.socketFactory.port=465
server.resources.mail-resource.mail/notifyMailSession.property.mail.smtp.socketFactory.fallback=false
server.resources.mail-resource.mail/notifyMailSession.property.mail.smtp.password= <My gmail App password>
server.resources.mail-resource.mail/notifyMailSession.property.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory