This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

JavaMail not sending emails all the time

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I'm having an issue with JavaMail, that is kind of frustrating. i'm currently modifying a program that uses the javamail api to send errors and traces to clients if the program fails. The problem is that sometimes the emails don't send. The frustrating part is that some errors are emailed and some are not, even out of the same class, so this problem would seem to not be relegated to just a singular class.

I've enabled debugging and am not seeing anything relevant. My gut tells me that it has something to do with the subject(thought, I couldn't tell you what.)

I have debugged the code and everything is being submitted properly. The email just doesn't send.

Has anybody had this issue before?

Here's the debug trace...



[ UD: added line breaks to preserve layout ]
[ December 01, 2008: Message edited by: Ulf Dittmer ]
 
B West
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, if I hard code a "String" in to the subject variable, the email will send. Is there some kind of restriction on the subject or something?
 
Sheriff
Posts: 26951
83
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If e-mails are received from the server unreliably and no errors are occurring when you send them to the server via JavaMail, then I would say your server is having problems. Have you discussed this with the server administrator?

Also, if I hard code a "String" in to the subject variable, the email will send.


Does this change make the e-mails be received 100% reliably, or is this just based on a small number of tests?
 
Sheriff
Posts: 22567
122
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried checking that exception stack trace? It's quite clear why it fails.
 
Paul Clapham
Sheriff
Posts: 26951
83
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rob Prime:
Have you tried checking that exception stack trace? It's quite clear why it fails.

I got sucked in at first and posted that too. But the stack trace shown there is actually the body of the e-mail. As B said:

a program that uses the javamail api to send errors and traces

 
B West
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for you reply's. I've only run through a small number of tests. But it would seem that when I hard code a subject in a email that won't send with a subject variable. The email will send. Again, to me it seems as if there is some kind of limitation. My subjects are a bit wordy, I have not checked with my admin, but I wanted to cover my bases with API first.
 
Paul Clapham
Sheriff
Posts: 26951
83
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
edwin angarita,
Your post was moved to a new topic.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic