fromSergiu Dumitriu <[email protected]> reply-toXWiki Developers <[email protected]> toXWiki Developers <[email protected]> dateTue, Jan 13, 2009 at 6:49 PM subjectRe: [xwiki-devs] Issue with authenticated SMTP servers for "Admin Email" setting in Xwiki
Niels Mayer wrote:
If I want to use smtp.gmail.com as my "Admin Email" preference set in
http://localhost:8080/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globalad... ;
the editor doesn't have the required fields or capabilities to provide "authenticated SMTP" required by Gmail and numerous other mail providers per http://mail.google.com/support/bin/answer.py?hl=en&answer=13287<../support/bin/answer.py?hl=en&answer=13287>::
....
The mailsender plugin uses JavaMail as the internal mail sender. Reading a bit about the SSL/TLS support in it, I found that basically what you need to do is define mail.smtp.starttls.enable=true.
http://java.sun.com/products/javamail/javadocs/com/sun/mail/smtp /package-summary.html also lists mail.smtp.ssl.protocols and mail.smtp.ssl.ciphersuites as SSL-related properties.
Also, in order to be able to use secure sockets, the JSSE library must be present in the classpath (I think it is with standard JDKs), and the host must be able to accept the server's certificate.
About the configuration part, the mailsender uses the javamail_extra_props property in your global XWikiPreferences as a standard .properties file (you will need to define it in the XWikiPreferences class, as a TextArea property).
So, basically what you need to do is:
1. Edit the XWiki.XWikiPreferences class and add a TextArea property named javamail_extra_props 2. Edit the XWiki.XWikiPreferences object and enter in it: mail.smtp.starttls.enable=true 3. Find out what else needs to be done on the JVM side to make TLS work.
-- Sergiu Dumitriu http://purl.org/net/sergiu/