Skip to content

Commit

Permalink
Merge pull request #2606 from iradraconis/feat/add-from-to-compose
Browse files Browse the repository at this point in the history
added "from" to compose call
  • Loading branch information
j-dimension authored Oct 8, 2024
2 parents dbfa4ed + 60ce1bf commit 05f22b3
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2629,6 +2629,12 @@ private void cmdOpenTbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIR
JOptionPane.showMessageDialog(this, "Thunderbird wurde nicht gefunden.");
return;
}
// Absender ermitteln
String from = "";
MailboxSetup fromMailbox = getSelectedMailbox();
if (fromMailbox != null) {
from = fromMailbox.getEmailAddress();
}

// Empfänger, CC, BCC und Betreff aus den Textfeldern holen
String to = this.txtTo.getText().trim();
Expand Down Expand Up @@ -2656,9 +2662,11 @@ private void cmdOpenTbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIR
command.add("-compose");

StringBuilder composeCommand = new StringBuilder();

composeCommand.append("from='").append(from).append("'");

if (!to.isEmpty()) {
composeCommand.append("to='").append(to).append("'");
composeCommand.append(",to='").append(to).append("'");
} else {
JOptionPane.showMessageDialog(this, "Empfänger ist erforderlich.");
return;
Expand Down

0 comments on commit 05f22b3

Please sign in to comment.