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

8/22/2022 - Mon
SOLUTION
mrcoffee365

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
OliviaRedhorse

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
mrcoffee365

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
OliviaRedhorse

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
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
OliviaRedhorse

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.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy