What's the difference between mail.smtp.auth and mail.smtp.requiresAuthentication in Javamail/Spring -
i'm using spring 3.1.0 send email using javamailsenderimpl class. here spring config xml
<bean id="mailsender" class="org.springframework.mail.javamail.javamailsenderimpl"> <property name="host" value="your.mail.server"/> <property name="port" value="25"/> <property name="protocol" value="smtp"/> <property name="username" value=""/> <property name="password" value=""/> <property name="defaultencoding" value="utf-8"/> <property name="javamailproperties"> <props> <prop key="mail.smtp.auth">true</prop> <prop key="mail.smtp.connectiontimeout">5000</prop> <prop key="mail.smtp.sendpartial">true</prop> <prop key="mail.smtp.userset">true</prop> <prop key="mail.mime.charset">utf-8</prop> <prop key="mail.smtp.issecure">false</prop> <prop key="mail.smtp.requiresauthentication">true</prop> <prop key="mail.smtp.port">25</prop> <prop key="mail.smtp.starttls.enable">false</prop> <prop key="mail.debug">true</prop> </props> </property> </bean> to honest i'm not sure got from, sample code got tutorial sometime.
i want turn off smtp authentication , can see javamail docs need set mail.smtp.auth property false. in config xml set property called mail.smtp.requiresauthentication name seems equally relevant, can't find reference in javamail or spring documentation. google find lots of examples of being used.
is mail.smtp.requiresauthentication needed , if do? deprecated, or bogus, property?
you should understand code before cut&paste...
there no mail.smtp.requiresauthentication property in javamail.
i don't know how spring uses javamail, in javamail if don't want authentication, don't call connect method provides username , password, or pass username , password null mail.smtp.auth set false. if call connect username or password not null, doesn't matter mail.smtp.auth set to.
Comments
Post a Comment