Hello,

thank you! Added this line in the "properties" section of the arquillian.xml and it works great now, thank you!

Emmanuel

On 05/09/14 10:18, Romain Manni-Bucau wrote:
Hi

you miss the resource declaration. (like if you do setXXX(xxxx)
without the new):

notificationsMail = new://Resource?type=javax.mail.Session


Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-09-05 9:07 GMT+02:00 Emmanuel Touzery <[email protected]>:
Hello,

     I'm trying to configure tomee-embedded for arquillian tests, that it
would send javamail to port 3025 instead of 25, and failing at achieving it
so far. It doesn't pick up my configuration and keeps sending to port 25.

     Here's how I use it to send email:

     @Resource(name = "notificationsMail")
     private Session mailSession;

     I tried this in the arquillian.xml:

     <container default="true" qualifier="tomee">
         <configuration>
             <property name="httpPort">8080</property>
             <property name="stopPort">-1</property>
             <property name="properties">
                 notificationsMail.mail.smtp.host=localhost
                 notificationsMail.mail.smtp.port=3025
                 notificationsMail.mail.smtp.socketFactory.port=3025
                 notificationsMail.mail.transport.protocol=smtp
                 notificationsMail.mail.smtp.user=user
                 notificationsMail.mail.smtp.debug=true
             </property>
         </configuration>
     </container>

     To no avail. I also tried giving the extra command-line parameters:
-DnotificationsMail.mail.smtp.port=3025
-DnotificationsMail.mail.smtp.socketFactory.port=3025

     And it also doesn't help.

     What am I doing wrong?

     Thank you,

Emmanuel

Reply via email to