Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8578371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:22:24+00:00 2026-06-11T20:22:24+00:00

I am running a JBoss server with underlaying Postfix server. When I am sending

  • 0

I am running a JBoss server with underlaying Postfix server. When I am sending emails, JavaMail creates a invalid messageID, e.g. Message-ID: <47112553230.139.4972667128159.JavaMail.undefined>.

I am using this code for sending mails:

Properties props = new Properties();
props.put("mail.smtp.host", "xxx.tld");
props.put("mail.host", "xxx.tld");
InitialContext ictx = new InitialContext(props);
Session sess = (Session) ictx.lookup("java:jboss/mail/Default");
Transport trans = sess.getTransport("smtp");
trans.connect();

MimeMessage msg = new MimeMessage(sess);
msg.setFrom(new InternetAddress(from));
msg.addRecipients(RecipientType.TO, InternetAddress.parse(to, false));
msg.setSubject(subject);
msg.setText(message);
msg.setHeader("Content-Type", "text/html; charset=\"utf-8\"");
msg.saveChanges();

Transport.send(msg, msg.getAllRecipients());
trans.close();

The main postfix configuration:

myhostname = xxx.tld
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = xxx.tld, Debian-60-squeeze-64-minimal, localhost.localdomain, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = 127.0.0.1

How can I fix this problem?

Best regards,
Christian

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:22:25+00:00Added an answer on June 11, 2026 at 8:22 pm

    This is how I could fix the problem with the help of @BillShannon:

    Properties props = new Properties();
    InitialContext ictx = new InitialContext(props);
    Session sess = (Session) ictx.lookup("java:jboss/mail/Default");
    props = sess.getProperties();
    props.put("mail.smtp.host", "xxx.tld");
    props.put("mail.host", "xxx.tld");
    props.put("mail.from", "yyy@xxx.tld");
    sess = Session.getInstance(props);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem with keeping a JBoss server running. Here's the command I'm
I have a web application deployed on a jboss server running on a unix
Running JBoss 5.1, with Hibernate as the JPA provider. Backed with SQL Server 2008.
I have a web application running in a jboss application server (But it is
I am running a JBoss instance on a linux server I am using the
I'm running a web app in Jboss application server and I'm trying to implement
I browse to a JSP on my server (running JBoss 4.0.4). That jsp contains
I have jboss server running with fr_CH locale and application client running with de_CH
I'm debugging an application on a remote server running JBoss using Eclipse. My particular
How do I clear JBoss' server.log file when JBoss is running ? When I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.