-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(mail-connector): Adding Dropdown for Outbound Connector to switch content type between plain text and html #3569
base: main
Are you sure you want to change the base?
Conversation
…n mime type of plain text or html to send html templates
@itsnuyen Thanks for your contribution. We will get back to you! |
@itsnuyen Thanks again for the PR. We discussed this internally with product. We would prefer to offer a Dropdown that allows the following options:
Would that work for you and if so could you adapt your PR? Thanks! |
Hi @sbuettner, I can adapt the PR with the suggested recommendations. |
@itsnuyen Yes, exactly. Its common practice to send both in case the users email client is not able to show HTML: |
Hi @sbuettner, as Minh is on vacation for a month and the customer request the HTML emails, it would be good to separate the complicated html/text mix from the current pull request to a new issue and resolve it later. Would it be OK to merge this change now and add a new issue to follow up on the combination of HTML and plain text? Or find a way, to extract the plain text from the html and add it to the mail body automatically? |
Hi |
...main/java/io/camunda/connector/email/client/jakarta/outbound/JakartaEmailActionExecutor.java
Fixed
Show resolved
Hide resolved
|
||
@Test | ||
void executeSmtpSendEmailAsMultiPart() throws MessagingException { | ||
buildSmtpTest(ContentType.MULTIPART, "<html><body>body</body></html>", "multipart/mixed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to add the second part (in plain text) to the email body?
Thanks for your contriburation and considering the feedback @itsnuyen @ingorichtsmeier @mathias-vandaele from the Connectors team will do a review, fix and merge any upcoming changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few comments, but overall it's a good PR 👍
...main/java/io/camunda/connector/email/client/jakarta/outbound/JakartaEmailActionExecutor.java
Fixed
Show resolved
Hide resolved
HTML, | ||
MULTIPART; | ||
|
||
public static class Constants { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having Constants, we could manage this directly within the enum, like this
PLAIN("plain"),
HTML("html"),
MULTIPART("multipart");
@mathias-vandaele As @itsnuyen is on vacation would you take care of doing the requested changes yourself? |
"tooltip" : "Email's contentType", | ||
"type" : "Dropdown", | ||
"choices" : [ { | ||
"name" : "Plain", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets use Plaintext
"name" : "Plain", | ||
"value" : "PLAIN" | ||
}, { | ||
"name" : "Html", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"HTML"
"name" : "Html", | ||
"value" : "HTML" | ||
}, { | ||
"name" : "Html+Plain", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"HTML & Plaintext"
Description
Adding a Dropdown to set the content type of an email so that html templates can be used in this email outbound connector.
Also set the right content type in the smtp send mail
Checklist
no milestone
label.