-
spring email problem
The following error occur when i send email in junit. I also include the xml confuguration here. Hope you all help. Did i forget to configure something?
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: Unable to locate provider for protocol: smtp
javax.mail.NoSuchProviderException: Unable to locate provider for protocol: smtp
at javax.mail.Session.getProvider(Session.java:225)
at javax.mail.Session.getTransport(Session.java:331)
at org.springframework.mail.javamail.JavaMailSenderIm pl.getTransport(JavaMailSenderImpl.java:412)
at org.springframework.mail.javamail.JavaMailSenderIm pl.doSend(JavaMailSenderImpl.java:372)
at org.springframework.mail.javamail.JavaMailSenderIm pl.send............
<bean id="mailSenderInfo" class="org.springframework.mail.javamail.JavaMailS enderImpl" >
<property name="host">
<value>21.2.13.1</value>
</property>
<property name="username">
<value>user</value>
</property>
<property name="password">
<value>pass</value>
</property>
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">true</prop>
</props>
</property>
</bean>
<bean id="SimpleMailMessage" >
<property name="from">
<value>a11111@yahoo.com</value>
</property>
<property name="subject">
<value>email</value>
</property>
<property name="text">
<value>contain</value>
</property>
</bean>
<bean id="emailManager" class="EmailManagerImpl" singleton="false">
<property name="simpleMailMessage" ref="sMMessage"/>
<property name="mailSender" ref="mailSenderInfo"/>
</bean>
Similar Threads
-
By Brian in forum Enterprise
Replies: 0
Last Post: 08-13-2003, 02:22 PM
-
By tyris in forum VB Classic
Replies: 6
Last Post: 02-01-2001, 02:08 AM
-
By J Barlow in forum ASP.NET
Replies: 9
Last Post: 01-26-2001, 11:42 AM
-
By John K. in forum ASP.NET
Replies: 0
Last Post: 01-24-2001, 12:45 PM
-
By Joshua Finer in forum ASP.NET
Replies: 1
Last Post: 09-25-2000, 11:25 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks