Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8335831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:47:35+00:00 2026-06-09T03:47:35+00:00

I am planning on using javamail to sent automated emails in a loop type

  • 0

I am planning on using javamail to sent automated emails in a loop type fashion. So for example I might have 300 emails that I need to build and send out with javamail one after the other. I am using timers in java to automate the process at a specific time each day.

What exceptions should I attempt to catch and how do I handle the error when I do catch an exception without interrupting the loop? What exceptions should I expect to run into? Unable to connect to SMTP server? Invalid email address? Etc?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:47:38+00:00Added an answer on June 9, 2026 at 3:47 am

    You’ll have to put the try/catch inside the loop. If you want the loop to keep going, you should just log the exception and process the next attempt.

    As for which exceptions to catch, you’ll be forced to catch all the checked ones. If you don’t want unchecked exceptions to interrupt the processing you’ll have to catch those, too. I would not go so far as to catch Throwable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a class that I was planning on using for simple JSON
We are using Asp.Net 2.0 and planning to move to TDD so that middle
I'm writing an application that manages something like Drupal's nodes. I'm planning on using
We are planning on using Jenkins (used to be Hudson) for the automated builds
Am planning on using declarative authorization in a Rails 3 app. I have the
Am planning on using declarative authorization in a Rails 3 app. I have the
I've been planning on using GIT for version control. However, I have a prolly
We are planning on using Red Gate SQL Source Control , but have not
Planning of using t4 template in a production environment. I have not used this
I have the following scenario where I’m planning in using windows authentication. 1.1) I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.