We are trying to set up a mail server for outgoing mails using gmail. The application is based on java. in config file smtp.gmail.com and port 587 is added same port is added in exim4-config file. But when mail is checked it throws an error as "com.sun.mail.smtp.SMTPSendFailedException:530 5.7.0 must issue a STARTTLS command first.
Can someone pl. help to sort out this error. Do we need to add any configuration in our tomcat/conf/server.xml file. If mail is sent directly through squirrelmail client it delivers in gmail account but the above error comes through tomcat. Anyhelp is greatly appreciated.