I want to use HtmlEmail in apache commons-email in a spring app, so i use the config xml as following:
<bean id="commonsEmail" class="org.apache.commons.mail.HtmlEmail">
<property name="hostName" value="smtp.example.com" />
<property name="TLS" value="true"/>
<property name="smtpPort" value="587"/>
</bean>
But i can't initialize it because of the smtpPort property:
Invalid property 'smtpPort' of bean class [org.apache.commons.mail.HtmlEmail]: Bean property 'smtpPort' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Please tell me what i've done wrong ? Thank you.