I'm trying to send email from my Appfuse/JSF/Hibernate app and get this exception:
MailEngine.send(75) | Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; It seems to think my mailserver details are localhost..., how can I change this? I've tried editing mail.properties as follows: (the mail a/c works btw, I've tested it in Mozilla Thunderbird) mail.default.from=PIL <[EMAIL PROTECTED]> mail.debug=false mail.transport.protocol=smtp mail.host=auth.smtp.onendone.co.uk [EMAIL PROTECTED] mail.password=pilpilpil I've also tried editing applicationContext-service.xml as follows: <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host" value="auth.smtp.1and1.co.uk"/> <property name="username" value="[EMAIL PROTECTED]"/> <property name="password" value="pilpilpil"/> <property name="javaMailProperties"> <value> mail.smtp.auth=true </value> </property> </bean> Here's the .java: String emailTo= "[EMAIL PROTECTED]"; String msg= "Calibre test email"; MailEngine mailEngine= new MailEngine(); SimpleMailMessage message= new SimpleMailMessage(); message.setTo(emailTo+ "<"+ emailTo + ">"); mailEngine.send(message); Rgds, Mike -- View this message in context: http://www.nabble.com/trying-to-send-email-tf4217379s2369.html#a11998228 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]