This is inside Mendix mailModule and cannot be changed. But you can write your own mail java action, or copy the one below.
Inside that you must add, (better is to pass a parameter, but I leave that one to you).
Message.addHeader("X-Priority", "1");
Java action parameters:
String ToAddresses,
String CCAddresses,
String BCCAddresses,
String FromAddress,
String PlainBody,
String HtmlBody,
String SMTPHost,
Long SMTPPort,
String SMTPUserName,
String SMTPPassword,
String Subject,
Boolean UseTLS
User code
Properties props = new Properties();
// create authenticator
SMTPAuthenticator auth = new SMTPAuthenticator(SMTPUserName != null ? SMTPUserName : "", SMTPPassword != null ? SMTPPassword : "");
// fill in mail properties
props.setProperty("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", SMTPHost);
// necessary to use gmail
props.put("mail.smtp.starttls.enable", UseTLS ? "true" : "false");
if (SMTPUserName != null && !"".equals(SMTPUserName.trim())) {
props.put("mail.smtp.user", SMTPUserName);
props.put("mail.smtp.password", SMTPPassword);
props.put("mail.smtp.auth", "true");
}
// portnumber
props.put("mail.smtp.port", this.SMTPPort != null ? this.SMTPPort.intValue() : 25);
// create mailsession and message
Session mailSession = Session.getDefaultInstance(props, auth);
Message Message = new MimeMessage(mailSession);
Message.addHeader("X-Priority", "1");
try {
// fill in from adress
Message.setFrom(new InternetAddress(FromAddress));
// subject
Message.setSubject(Subject);
// plain body text
if (PlainBody != null && !"".equals(PlainBody.trim())) {
Message.setText(PlainBody);
}
// html body text
if (HtmlBody != null && !"".equals(HtmlBody.trim())) {
Message.setContent(HtmlBody, "text/html");
}
// retrieve adresses TO
if( this.ToAddresses != null && !"".equals(this.ToAddresses.trim()) ) {
String[] addrArr = this.ToAddresses.split(",");
for( String addr : addrArr )
Message.addRecipient(RecipientType.TO, new InternetAddress(addr));
}
// retrieve adresses CC
if( this.CCAddresses != null && !"".equals(this.CCAddresses.trim()) ) {
String[] addrArr = this.CCAddresses.split(",");
for( String addr : addrArr )
Message.addRecipient(RecipientType.CC, new InternetAddress(addr));
}
// retrieve adresses BCC
if( this.BCCAddresses != null && !"".equals(this.BCCAddresses.trim()) ) {
String[] addrArr = this.CCAddresses.split(",");
for( String addr : addrArr )
Message.addRecipient(RecipientType.BCC, new InternetAddress(addr));
}
// actual send message
Transport.send(Message);
} catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}