reset password
Author Message
yurimuradyan
Posts: 42
Posted 22:57 May 20, 2009 |

Dr. Sun,

I was wondering how will you (or Sweta) be testing the subsription email, because with test data SMTP server complains:

WARN [http-8080-2] (MassMailSender.java:49) - Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 550 Invalid recipient: csns@localhost.localdomain

I get the same message when I try to test the Forum subsriptions, which was already present, so I know that one is correct.

Thanks!!

cysun
Posts: 2935
Posted 23:06 May 20, 2009 |

Did you set up the catch-all address? Warning or not, that address should get the email.

yurimuradyan
Posts: 42
Posted 23:14 May 20, 2009 |
cysun wrote:

Did you set up the catch-all address? Warning or not, that address should get the email.

I am sorry, I just figured it out. Thanks Professor!!!!!

 

Last edited by yurimuradyan at 23:16 May 20, 2009.
yurimuradyan
Posts: 42
Posted 23:29 May 20, 2009 |

Last question. Do we modify the spring-email.xml file or will you do it as part of testing? Namely this portion:

    <bean id="blogEntryNotificationEmailTemplate" class="csns.util.EmailTemplate">
        <constructor-arg value="@app.url@" />
        <property name="from" value="y_mur_2003@yahoo.com" />
        <property name="to" value="y_mur_2003@yahoo.com" />
        <property name="subject" value="New Blog Entry in CSNS Blog - @blog.title@" />
        <property name="content">
cysun
Posts: 2935
Posted 23:32 May 20, 2009 |
yurimuradyan wrote:

Last question. Do we modify the spring-email.xml file or will you do it as part of testing? Namely this portion:

    <bean id="blogEntryNotificationEmailTemplate" class="csns.util.EmailTemplate">
        <constructor-arg value="@app.url@" />
        <property name="from" value="y_mur_2003@yahoo.com" />
        <property name="to" value="y_mur_2003@yahoo.com" />
        <property name="subject" value="New Blog Entry in CSNS Blog - @blog.title@" />
        <property name="content">

We won't touch spring-email.xml, so you should use some account @localhost.localdomain, especially for the "to" property.

yurimuradyan
Posts: 42
Posted 23:38 May 20, 2009 |
cysun wrote:
yurimuradyan wrote:

Last question. Do we modify the spring-email.xml file or will you do it as part of testing? Namely this portion:

    <bean id="blogEntryNotificationEmailTemplate" class="csns.util.EmailTemplate">
        <constructor-arg value="@app.url@" />
        <property name="from" value="y_mur_2003@yahoo.com" />
        <property name="to" value="y_mur_2003@yahoo.com" />
        <property name="subject" value="New Blog Entry in CSNS Blog - @blog.title@" />
        <property name="content">

We won't touch spring-email.xml, so you should use some account @localhost.localdomain, especially for the "to" property.

Got it. So these lines of code inside spring-email.xml should be ok right, since it will be the same for all the messages?

    <bean id="blogEntryNotificationEmailTemplate" class="csns.util.EmailTemplate">
        <constructor-arg value="@app.url@" />
        <property name="from" value="csns@@email.domain" />
        <property name="subject" value="New Blog Entry in CSNS Blog - @blog.title@" />

 

cysun
Posts: 2935
Posted 23:41 May 20, 2009 |
yurimuradyan wrote:
cysun wrote:
yurimuradyan wrote:

Last question. Do we modify the spring-email.xml file or will you do it as part of testing? Namely this portion:

    <bean id="blogEntryNotificationEmailTemplate" class="csns.util.EmailTemplate">
        <constructor-arg value="@app.url@" />
        <property name="from" value="y_mur_2003@yahoo.com" />
        <property name="to" value="y_mur_2003@yahoo.com" />
        <property name="subject" value="New Blog Entry in CSNS Blog - @blog.title@" />
        <property name="content">

We won't touch spring-email.xml, so you should use some account @localhost.localdomain, especially for the "to" property.

Got it. So these lines of code inside spring-email.xml should be ok right, since it will be the same for all the messages?

    <bean id="blogEntryNotificationEmailTemplate" class="csns.util.EmailTemplate">
        <constructor-arg value="@app.url@" />
        <property name="from" value="csns@@email.domain" />
        <property name="subject" value="New Blog Entry in CSNS Blog - @blog.title@" /> 

I don't get the csns@@email.domain part. It should be something like csns@localhost.localdomain.

Last edited by cysun at 23:42 May 20, 2009.
yurimuradyan
Posts: 42
Posted 00:16 May 21, 2009 |
cysun wrote:
yurimuradyan wrote:
cysun wrote:
yurimuradyan wrote:

Last question. Do we modify the spring-email.xml file or will you do it as part of testing? Namely this portion:

    <bean id="blogEntryNotificationEmailTemplate" class="csns.util.EmailTemplate">
        <constructor-arg value="@app.url@" />
        <property name="from" value="y_mur_2003@yahoo.com" />
        <property name="to" value="y_mur_2003@yahoo.com" />
        <property name="subject" value="New Blog Entry in CSNS Blog - @blog.title@" />
        <property name="content">

We won't touch spring-email.xml, so you should use some account @localhost.localdomain, especially for the "to" property.

Got it. So these lines of code inside spring-email.xml should be ok right, since it will be the same for all the messages?

    <bean id="blogEntryNotificationEmailTemplate" class="csns.util.EmailTemplate">
        <constructor-arg value="@app.url@" />
        <property name="from" value="csns@@email.domain" />
        <property name="subject" value="New Blog Entry in CSNS Blog - @blog.title@" /> 

I don't get the csns@@email.domain part. It should be something like csns@localhost.localdomain.

I think it is a typo I have. It should be csns@@email.domain@   In this case it substitutes email.domain with localhost.localdomain from EmailTemplate.java (or at least that's what I thought).

Last edited by yurimuradyan at 00:17 May 21, 2009.
cysun
Posts: 2935
Posted 08:43 May 21, 2009 |
yurimuradyan wrote:

I think it is a typo I have. It should be csns@@email.domain@   In this case it substitutes email.domain with localhost.localdomain from EmailTemplate.java (or at least that's what I thought).

If it's a token to be replaced in EmailTemplate.java, why not just put csns@localhost.localdomain directly in spring-email.xml? Note that if something is common to all emails, you can put it in spring-email.xml, and if something is specific to each email, you put a token in spring-email.xml and replace it with the real value for each email at runtime.

yurimuradyan
Posts: 42
Posted 09:19 May 21, 2009 |
cysun wrote:
yurimuradyan wrote:

I think it is a typo I have. It should be csns@@email.domain@   In this case it substitutes email.domain with localhost.localdomain from EmailTemplate.java (or at least that's what I thought).

If it's a token to be replaced in EmailTemplate.java, why not just put csns@localhost.localdomain directly in spring-email.xml? Note that if something is common to all emails, you can put it in spring-email.xml, and if something is specific to each email, you put a token in spring-email.xml and replace it with the real value for each email at runtime.

That's exactly what I ended up doing. It all started by me copy and pasting another bean from the same file and trying to figure out how it works. Now I have csns@localhost.localdomain in the file, for From and I update the To to each specific email address inside the controller.

liangxu
Posts: 15
Posted 10:37 May 21, 2009 |

Hi,

Sorry I didn't get the meaning of "catch-all address".  Shall I include a real email address like  something@yahoo.com

in the recipients' list to get the email?  or it is something else?

Thanks.

 

 

cysun
Posts: 2935
Posted 11:00 May 21, 2009 |
liangxu wrote:

Hi,

Sorry I didn't get the meaning of "catch-all address".  Shall I include a real email address like  something@yahoo.com

in the recipients' list to get the email?  or it is something else?

Thanks.

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