reset password
Author Message
xieguahu
Posts: 50
Posted 19:27 Nov 11, 2009 |

How to test this function after finishing coding?

cysun
Posts: 2935
Posted 21:16 Nov 11, 2009 |

See http://sun.calstatela.edu/~cysun/www/teaching/cs520/lectures/email.html.

Last edited by cysun at 21:16 Nov 11, 2009.
nshatok
Posts: 19
Posted 11:28 Nov 12, 2009 |

What about Mac users? What server do you recommend?

I found this one: http://www.kerio.com/mailserver/download

Is this what we need?

cysun
Posts: 2935
Posted 12:20 Nov 12, 2009 |
nshatok wrote:

What about Mac users? What server do you recommend?

I found this one: http://www.kerio.com/mailserver/download

Is this what we need?

Kerio should work, but it's not free.

You can set up Postfix on Max, but the process seems to be complicated.

My suggestion would be using an external SMTP server instead of installing one on your computer. For example, go to Google and search "use gmail smtp", and you should find instructions on how to send email using GMail's SMTP server.

xieguahu
Posts: 50
Posted 21:23 Nov 12, 2009 |
cysun wrote:
nshatok wrote:

What about Mac users? What server do you recommend?

I found this one: http://www.kerio.com/mailserver/download

Is this what we need?

Kerio should work, but it's not free.

You can set up Postfix on Max, but the process seems to be complicated.

My suggestion would be using an external SMTP server instead of installing one on your computer. For example, go to Google and search "use gmail smtp", and you should find instructions on how to send email using GMail's SMTP server.

I followed the video, but got some error.  So I tried to use gmail smtp instead.  Then the question is that how we modify mail.smtp.server, mail.smtp.username and mail.smtp.password in build.properties files

xieguahu
Posts: 50
Posted 21:59 Nov 12, 2009 |

I did some search, and I found out that I should modify my spring-email.xml to

 

<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="smtp.gmail.com" />
<property name="port" value="465" />
<property name="protocol" value="smtps" />
<property name="username" value="yourAccount@gmail.com"/>
<property name="password" value="yourPassword"/>
<property name="javaMailProperties">
<props>
<prop key="mail.smtps.auth">true</prop>
<prop key="mail.smtps.starttls.enable">true</prop>
<prop key="mail.smtps.debug">true</prop>
</props>
</property>
</bean>

 

and also change the student email address to "yourAccount@gmail.com".  And everything works fine for me and I got 30 new emails in my gmail account when I tried to publish an onlineAssignment.

But my question is that this is OK for my testing, so when I submit the code, I should not change spring-email.xml file, and I do not need to worry about build.properties file either because Dr.Sun will use his build.properties to test our code.  Also I do not need to change the student email address to "yourAccount@gmail.com", they should be XXXX@localhost.localdomain.  Am I right about those?

Last edited by xieguahu at 22:02 Nov 12, 2009.
Sanaz_6101
Posts: 40
Posted 17:18 Nov 13, 2009 |
xieguahu wrote:

I did some search, and I found out that I should modify my spring-email.xml to

 

<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="smtp.gmail.com" />
<property name="port" value="465" />
<property name="protocol" value="smtps" />
<property name="username" value="yourAccount@gmail.com"/>
<property name="password" value="yourPassword"/>
<property name="javaMailProperties">
<props>
<prop key="mail.smtps.auth">true</prop>
<prop key="mail.smtps.starttls.enable">true</prop>
<prop key="mail.smtps.debug">true</prop>
</props>
</property>
</bean>

 

and also change the student email address to "yourAccount@gmail.com".  And everything works fine for me and I got 30 new emails in my gmail account when I tried to publish an onlineAssignment.

But my question is that this is OK for my testing, so when I submit the code, I should not change spring-email.xml file, and I do not need to worry about build.properties file either because Dr.Sun will use his build.properties to test our code.  Also I do not need to change the student email address to "yourAccount@gmail.com", they should be XXXX@localhost.localdomain.  Am I right about those?

 

Hello

Im a mac user and I guess I have the same problem as yours, Im wondering base on your note should I use GMail's SMTP server and then the other changes in servlet-email.xml??

Thank you