CuriousHARD
Jun 15th, 2007, 07:06 AM
hi i want to send an email programatically in my spring application,...
my configuration entries are
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderIm pl">
<property name="host" value="auth.smtp.1and1.co.uk"/> <!-- auth.smtp.1and1.co.uk -->
<property name="port" value="25" />
<property name="protocol" value="smtp" />
<property name="username" value="atieq@aedsys.co.uk"/>
<property name="password" value="university"/>
<property name="javaMailProperties">
<props>
<prop key="mail.smtps.auth">true</prop>
</props>
</property>
</bean>
<bean id="mailMessage" class="org.springframework.mail.SimpleMailMessage">
<property name="from">
<value>atieq@aedsys.co.uk</value>
</property>
<property name="subject">
<value>File finished uploading</value>
</property>
</bean>
and the code is
SimpleMailMessage msg = new SimpleMailMessage(this.msg);
msg.setTo("curious_hard@hotmail.com");
msg.setText("This is the testing mail ");
mailSender.send(msg);
i m receiving an error
org.springframework.mail.MailSendException; nested exception details (1) are:
Failed message 1:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 must be authenticated
i could nt understand what is the problem ....
eager to get reply
my configuration entries are
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderIm pl">
<property name="host" value="auth.smtp.1and1.co.uk"/> <!-- auth.smtp.1and1.co.uk -->
<property name="port" value="25" />
<property name="protocol" value="smtp" />
<property name="username" value="atieq@aedsys.co.uk"/>
<property name="password" value="university"/>
<property name="javaMailProperties">
<props>
<prop key="mail.smtps.auth">true</prop>
</props>
</property>
</bean>
<bean id="mailMessage" class="org.springframework.mail.SimpleMailMessage">
<property name="from">
<value>atieq@aedsys.co.uk</value>
</property>
<property name="subject">
<value>File finished uploading</value>
</property>
</bean>
and the code is
SimpleMailMessage msg = new SimpleMailMessage(this.msg);
msg.setTo("curious_hard@hotmail.com");
msg.setText("This is the testing mail ");
mailSender.send(msg);
i m receiving an error
org.springframework.mail.MailSendException; nested exception details (1) are:
Failed message 1:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 must be authenticated
i could nt understand what is the problem ....
eager to get reply