You'll need to keep track of how many it sends and tell it to stop and wait a specified amount of time when that number reaches 400.
Here's an example. I do not know how long you might want it to wait, I assumed 30 seconds.
int SentEmails = 0;
if (SentEmails != 400) //This code will run if you have not yet sent 400 emails
//Your code to send an email
SentEmails++; //Add one to SentEmails
else //SentEmails equals 400.
SentEmails = 0; //Set it back to zero so we can do it all over again
System.Threading.Thread.Sleep(30000); //Wait thirty seconds. (The amount is in milliseconds)
I'm not really understanding what you mean but I'm guessing it's waiting too long. To make it go faster you'll need to change line 12 to a lower value. The value is in milliseconds and you can get that simply multiplying the number of seconds you want by 1000. If you want 2 seconds type 2000, 5 seconds 5000, 0.5 seconds 500, etc.
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...