javamail - Not able to send mail using Java Mail Api -
i trying send mail user using google .my code working fine on localhost , tried deploying on server , there causing issue of authentication , not working on localhost well, here error getting :
org.springframework.web.util.nestedservletexception: request processing failed; nested exception org.springframework.mail.mailauthenticationexception: authentication failed; nested exception javax.mail.authenticationfailedexception: 535-5.7.8 username , password not accepted. learn more @ 535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 sz6sm1026673pab.5 - gsmtp
i thought might issue gmail account using send mail, tried account still same issue .
can have idea causing issue , ip address blocked or tried repeadly.
below configuration in xml :
<bean id="mailsender" class="org.springframework.mail.javamail.javamailsenderimpl"> <property name="host" value="smtp.gmail.com" /> <property name="port" value="587" /> <property name="username" value="dummy1@gmail.com" /> <property name="password" value="abc1234" /> <property name="javamailproperties"> <props> <!-- use smtp transport protocol --> <prop key="mail.transport.protocol">smtp</prop> <!-- use smtp-auth authenticate smtp server --> <prop key="mail.smtp.auth">true</prop> <!-- use tls encrypt communication smtp server --> <prop key="mail.smtp.starttls.enable">true</prop> <prop key="mail.debug">true</prop> </props> </property> </bean>
the authentication error might misleading, configuration error. can post code using try send mail?
Comments
Post a Comment