This blog promotes knowledge sharing through experience and collaboration. For more product information, visit our WebSphere Commerce CSE page. For easier navigation, utilize the Categories to find posts that match your interest.
How do I tweak this Message-ID header in my outbound e-mails?
When examining e-mails generated from Commerce (and other systems as well), you may notice a header field called "Message-ID". Sometimes, this field may include username and/or host information, for example:
Some teams may feel a bit uneasy about this information being present in the e-mail. Generally, WebSphere Commerce should not be setting the Message-ID field by default. The SMTP e-mail server generates a unique ID here to uniquely identify the message. A JavaMail API FAQ elaborates on how one can set their own Message-ID from the application.
You can customize the default messaging commands via the standard task command extension procedure. Although, you will need to replace the existing logic altogether so that multiple messages are not sent. The following documentation provides some samples task command extensions.
Customizing existing task commands
For Java examples of composing messages in your extended commands see:
Examples: Outbound messaging using SendMsgCmd
For a list of the task commands used by the various messages types, please see the following document: