Avatar of OliviaRedhorse
OliviaRedhorseFlag for United States of America

asked on 

How to further debug Transport.send method?

I have a web application that sends email from inside a bean.  Whats happening here is, I notice the Transport.send method is taking about 3-5 minutes to send an email message. It was working fine last week, usually it is a quick process.  I get no error messages of any kind, just that it takes longer to send the message.  How can I further debug or pin point the problem with using Transport.send?  I was thinking it has to do something with the SMTP, but I am not for sure.
JSP

Avatar of undefined
Last Comment
OliviaRedhorse
SOLUTION
Avatar of mrcoffee365
mrcoffee365
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of OliviaRedhorse

ASKER

mrcoffee,

I did try your suggestion but I only received this message out of it.  Maybe I am not using it correctly.
DEBUG: setDebug: JavaMail version 1.4ea

Here are some things I noticed which I thought was interesting.  I create two web applications that send email.  

App1 get the TO and FROM address, plus subject and body of the message and sends it in the results page.  Meaning lets jsppage1 gets info. from the user and the user clicks submit. The data is forwarded to another page where in the of that page the message is sent. Using this method, it works fine and it is very quick to display the next page.  

App2 on other hand, does not work as expected.  App2 is taking App1 and modifying into the following structure; 1) index page gets data from the user 2) data is sent to servlet 3) data is forwarded to a sendEmail class to complete the send message 4) once it is complete, the send page is displayed.  This method has a delay for about 3-5 minutes waiting on Transport.sent().  I am thinking it is waiting for a complete from Transport.sent() but it is not there.  I also noticed I received the email message before the send page appeared on my screen. So now I am confused.

The debug message did not help my analysis.  Is it because I am waiting for a success message to come from the Transport.sent() but I am not getting it back, that it is holding up my result page?

Look at the attached file for more info on the code.  Big thank you for your help.
TestEmail.txt
SOLUTION
Avatar of mrcoffee365
mrcoffee365
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
SOLUTION
Avatar of mrcoffee365
mrcoffee365
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of OliviaRedhorse

ASKER

Yes, you are right.  Thank you for catching my mistake.  I did receive very helpful information.  I attached a summary of what I found and comments are includes to let you know where it hangs up for 1-3 minutes.  What do you think?
ressum.txt
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
ASKER CERTIFIED SOLUTION
Avatar of mrcoffee365
mrcoffee365
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of OliviaRedhorse

ASKER

Did your SMTP server changed its authentication methods or changed its LDAP settings?  I am not sure, but it is possible because this worked fine before.

Do you have the capability to turn on debugging on the mail server?  No
What is the version of the mail server software your server is using? This I don't know.  The server is monitored by others.

mrcoffee,

You were right about the From address part. Once I changed it, it worked.

Thanks all, this was very informative.
JSP
JSP

JavaServer Pages (JSP) allow the development of dynamically generated web pages. It uses the Java programming language; JSP pages are translated into servlets at runtime, with each servlet being cached and reused until the JSP is modified. JSP allows Java code to be interleaved with static web markup content, so the resulting page can be compiled and executed on the server to deliver the content.

16K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo