Skip to content

Commit

Permalink
Merge pull request #101 from assimbly/fix/email-component-when-oauth-…
Browse files Browse the repository at this point in the history
…do-not-use-defaultSender

Email component - when oauth is used, don't use defaultSender
  • Loading branch information
skin27 authored Jul 3, 2024
2 parents 584fc8c + c5540b4 commit 7b1d985
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public MailEndpoint getEndpoint() {
protected JavaMailSender getSender(Exchange exchange) {
// do we have special headers
Map<String, Object> additional = URISupport.extractProperties(exchange.getMessage().getHeaders(), "mail.smtp.");
if (additional.isEmpty()) {
if (additional.isEmpty() && getEndpoint().getConfiguration().isBasicAuthentication()) {
// no then use default sender
LOG.trace("Using default JavaMailSender");
return defaultSender;
Expand Down

0 comments on commit 7b1d985

Please sign in to comment.