mailSender.setHost("localhost");
    protected void setUp() throws Exception {        super.setUp();        // change the port on the mailSender so it doesn't conflict with an         // existing SMTP server on localhost        JavaMailSenderImpl mailSender = (JavaMailSenderImpl) ctx.getBean("mailSender");        mailSender.setPort(2525);    }