Had the same problem, same error alert, the other day although my iPhone 3GS had previously had no problem sending out email. Solved it by turning off phone completely (not just putting it to sleep) and restarting. Works with computers, figured it might work with the iPhone too. And it did...