I am working with jWordPress that combines Quercus and JavaMail 1.4.1 with WordPress 4.2.2 in a WAR file executed under Tomcat on Windows. I am having trouble configuring outgoing email service: By default, Quercus attempts to contact an SMTP server on port 25 of localhost, which fails.
In the WAR file, Quercus is configured via WEB-INF/web.xml that, among other settings, has the following one (I uncommented it in the original file):
<init-param>
<param-name>ini-file</param-name>
<param-value>WEB-INF/php.ini</param-value>
</init-param>
I created a WEB-INF/php.ini file with the following settings for AWS SES, which work fine with JavaMail in a different app (note that this is an authenticated STARTTLS connection on port 587):
[PHP]
[mail function]
SMTP = <address of the AWS SES SMTP host>
smtp_port = 587
smtp_username = <AWS SES username>
smtp_password = <AWS SES password>
sendmail_from = <a 'no-reply' email address>
The names of the above parameters correspond to the ones found in the Quercus' MailModule:
The WEB-INF/web.xml file appears to be processed at startup because if errors are introduced in it, they are reflected in the Tomcat log as well as in the WordPress operation. However, there is no indication in the log that the WEB-INF/php.ini is read or processed.
WordPress seems to be working fine. A simple test of the WP outgoing email is to click on "Log In" under Meta, then on "Lost your password?", enter the WP username and click on "Get New Password". This results in the following warnings in the Tomcat log:
10-Sep-2015 09:57:47.836 WARNING [http-nio-8080-exec-4] com.caucho.quercus.lib.mail.MailModule.mail Quercus[] mail could not send mail to '<user email address>'
Could not connect to SMTP host: localhost, port: 25
So, it looks like Quercus MailModule is not seeing settings from php.ini. How do I fix this?
P.S. Please do not suggest workaround solutions that require an installation of sendmail or alike on port 25 of localhost.