Email reply: Modify the subject, ReplyTo and the from-address
Sometimes there is a requirement for certain groups that for emails that are sent from the finishing dialog to set automatically the
- the subject
- the from-address and/or
- the ReplyTo address
For this purpose please modify the script of the "Send Action" of the team for which this rules should apply.
Login to todo4teams as administrator, select the navigation element teams. Click on the team concerned and the configuration editor for teams opens automatically. Now select in the scripts tab the "Send Action":
A reference to the outgoing email you may receive as follows.
It will be checked if this ticket was actually generated via an email mailbox. Otherwise the outEmail null remains null:
if(task.getSource()!=null && task.getSource().getSourcemailbox()!=null){
task.getSource().getSourcemailbox().getReplyContainer();
}
You can use now the following methods for the outEmail object:
- setSubject (subject) to set the subject
- setFrom (email address) to set the from-address and
- setReplyTo (email address) to set the ReplyTo-address.
As usual, you may exhaust all possibilities in the script and modify the subject dynamically. But please check first whether outEmail is a valid object (non null):
outEmail.setSubject("Ihre Anfrage: "+task.getId());
outEmail.setReplyTo("sales@yourcompany.com");
outEmail.setFrom("presales@yourcompany.com");
}
Please note: Your email server must allow your selected from-address for sending the modified email. Please test your settings first!
Customers who receive the email responses from the selected todo4teams group will then experience the changed subject and sender.
Furthermore, if the customer tries to answer the email, the answer will be sent to the selected ReplyTo address.