n = 2^10000;
numPrimes = 5;
primes = {};
i = 1;
While[i <= 5,
AppendTo[primes, Timing[n = NextPrime[n]]];
SendMail[
"To" -> "bobexample@wolfram.com",
"Subject" -> "Prime has been factored!",
"From" -> "prime.factor@wolfram.com",
"FullName" -> "Prime Factor Reports",
"Body" ->
"Prime Number: " <> ToString[primes[[-1, 2]]] <>
"\n\nComputation time: " <> ToString[primes[[-1, 1]], InputForm]
];
i++;
]