javatestingjunitgreenmail

greenmail server not receiving the mail



Solution

  • GreenMail is running at localhost. Adjust your smtp host accordingly:

    props.put("mail.smtp.host", "localhost");
    

    Edit

    To summarize the large number of comments: The additional problem came from fact that mock-javamail was on the classpath.