Using gmail as SMTP server in Java web app is slow
Posted
by
Annie
on Stack Overflow
See other posts from Stack Overflow
or by Annie
Published on 2010-04-13T12:33:29Z
Indexed on
2010/12/22
11:54 UTC
Read the original article
Hit count: 275
Hi,
I was wondering if anyone might be able to explain to me why it's taking nearly 30 seconds each time my Java web app sends an email using Gmail's SMTP server? See the following timestamps:
13/04/2010-22:24:27:281 DEBUG test.service.impl.SynchronousEmailService - Before sending mail. 13/04/2010-22:24:52:625 DEBUG test.service.impl.SynchronousEmailService - After sending mail.
I'm using spring's JavaMailSender class with the following settings:
email.host=smtp.gmail.com
[email protected] email.password=mypassword email.port=465 mail.smtp.auth.required=true
Note that the mail is getting sent and I'm receiving it fine, there's just this delay which is resulting in a slow experience for the application user.
If you know how I can diagnose the problem myself that would be good too :)
© Stack Overflow or respective owner