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 171043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:55:02+00:00 2026-05-11T12:55:02+00:00

We have a batch program that incorporates JavaMail 1.2 that sends emails. In our

  • 0

We have a batch program that incorporates JavaMail 1.2 that sends emails. In our development environment, we haven’t got the chance to encounter the above mentioned exception. But in the client’s environment, they had experienced this a lot of times with the following error trace:

javax.mail.MessagingException: 550 Requested action not taken: NUL characters are not allowed.   at com.sun.mail.smtp.SMTPTransport.issueCommand (SMTPTransport.java: 879)   at com.sun.mail.smtp.SMTPTransport.finishData (SMTPTransport.java: 820)   at com.sun.mail.smtp.SMTPTransport.sendMessage (SMTPTransport.java: 322)   ... 

I’m not sure if this is connected to my problem, https://bugs.java.com/bugdatabase/view_bug?bug_id=4697158. But trying JavaMail 1.4.2, I see that the content transfer encoding of the email is still 7bit, so I’m not sure if using JavaMail 1.4.2 could solve the problem. Please take note that I could only do testing in our development environment that hasn’t been able to replicate this.

With the above exception, how would i know if this is from the sender or the receiver side? What debugging steps could you suggest?

EDIT: Here is a DEBUG of the actual sending (masked some information):

DEBUG: not loading system providers in &lt;java.home&gt;</a>/lib  DEBUG: not loading optional custom providers file: /META-INF/javamail.providers  DEBUG: successfully loaded default providers    DEBUG: Tables of loaded providers  DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}  DEBUG: Providers Listed By Protocol: {imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}  DEBUG: not loading optional address map file: /META-INF/javamail.address.map    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]  DEBUG SMTP: useEhlo true, useAuth false    DEBUG: SMTPTransport trying to connect to host "nnn.nnn.n.nnn", port nn    DEBUG SMTP RCVD: 220 xxxx.xxxxxxxxxxx.xxx SMTP; Mon, 23 Mar 2009 15:18:57 +0800    DEBUG: SMTPTransport connected to host "nnn.nnn.n.nnn", port: nn    DEBUG SMTP SENT: EHLO xxxxxxxxx  DEBUG SMTP RCVD: 250 xxxx.xxxxxxxxxxx.xxx Hello    DEBUG SMTP: use8bit false  DEBUG SMTP SENT: MAIL FROM:<a href="newmsg.cgi?mbx=Main&to=xxxx@xxxxxxxxxxx.xxx">&lt;xxxx@xxxxxxxxxxx.xxx&gt;</a>  DEBUG SMTP RCVD: 250 <a href="newmsg.cgi?mbx=Main&to=xxxx@xxxxxxxxxxx.xxx">&lt;xxxx@xxxxxxxxxxx.xxx&gt;</a>... Sender ok    DEBUG SMTP SENT: RCPT TO:&lt;yyyyyyyy@yyyyy.yyy.yy&gt;  DEBUG SMTP RCVD: 250 &lt;yyyyyyyy@yyyyy.yyy.yy&gt;... Recipient ok    Verified Addresses  &nbsp;&nbsp;yyyyyyyy@yyyyy.yyy.yy  DEBUG SMTP SENT: DATA  DEBUG SMTP RCVD: 354 Enter mail, end with "." on a line by itself    DEBUG SMTP SENT:   .  DEBUG SMTP RCVD: 550 Requested action not taken: NUL characters are not allowed. 
  • 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. 2026-05-11T12:55:03+00:00Added an answer on May 11, 2026 at 12:55 pm

    You can try to enable debugging messages, if this is not a security risk:

    session.setDebug(true); 

    Then, I would also be interested to know the following: the content of the mail and the recipient. If you log these, you can try to reproduce the behavior from your machine. It could just be that some email servers reject mails with NUL characters.

    Edit: Based on the debug information I believe that most probably the remote mail server rejects the mail with NUL characters. In order to verify this, try to send the exact same mail to the same recipient with some other means. Also, try to send a test email to the same recipient that doesn’t contain NUL characters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 76k
  • Answers 76k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer 'x:Type' is a markup extension, so enclose it in curly… May 11, 2026 at 3:14 pm
  • added an answer You could overwrite document.write to just store the input and… May 11, 2026 at 3:14 pm
  • added an answer Suggestions Environment Setup I would recommend you install a the… May 11, 2026 at 3:14 pm

Related Questions

I'd like to calculate the age of the messages in an Exchange mailbox to
I have 2 batch programs, 1 is a program that sends email and another
I have an application which get copied and run on client machines. The program
I have no experience writing batch scripts, but I was wondering if there was

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.