Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with sending email  RSS feed

 
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone , I want to send email and I can . But in my code Java is waiting for sending email and method does not finish till sending email . How can I insert db by doesn't depending on email . I write code as two process which doesn't depend on each other . This is my code ,I hope that , you can understand me ,  Thanks in advance .

 
Saloon Keeper
Posts: 4477
112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm assuming that you mean the emailService.sendMail method does not return immediately. The first approach to look into would be to have that method spin off the actual sending (which apparently blocks the code) into a separate thread.
 
I yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!