I have emails generated inside a ui:repeat:
<ui:repeat value="#{emailNotificationTemplate.emailList}" var="emailList"> <m:message> <m:from name="#{emailNotificationTemplate.fromName}" address="#{emailNotificationTemplate.fromEmail}"/> <m:to name="#{emailList.firstname} #{emailList.lastname}" address="#{emailList.email}" /> <m:subject> #{emailNotificationTemplate.subject} </m:subject> <m:body> ... </m:body> </m:message> </ui:repeat>
question 1:
If the template hits a bad email address it generates an error and no more emails are sent. How do I catch that so only the bad email is skipped?
question 2:
How do I make the subject dynamic? When I try to customize each subject with some variation of:
<m:subject> <h:outputText value="#{emailList.subject}"/> </m:subject>
I end up with a blank subject line or quotation marks. Is there a way to do this?
Thanx in advance
Couldn't figure out how to make it work the way it was, so I changed it so I don't use ui:repeat. Instead of passing a list to a renderer, I call the renderer for each object. This takes care of the subject problem also.