Foren
Send email in Freemarker Template
Etienne Roy, geändert vor 9 Jahren.
Send email in Freemarker Template
Regular Member Beiträge: 114 Beitrittsdatum: 08.08.13 Neueste Beiträge
Hi
It is possible to send email in a freemarker template ?
Thank
It is possible to send email in a freemarker template ?
Thank
Etienne Roy, geändert vor 9 Jahren.
RE: Send email in Freemarker Template
Regular Member Beiträge: 114 Beitrittsdatum: 08.08.13 Neueste Beiträge
I try to use the variable serviceLocator but I always have this error Expression serviceLocator is undefined on line ...
do you know why is not work ?
example
<#assign DDLRecordLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService")>
do you know why is not work ?
example
<#assign DDLRecordLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService")>
Cody Hoag, geändert vor 9 Jahren.
RE: Send email in Freemarker Template
Junior Member Beiträge: 70 Beitrittsdatum: 26.04.12 Neueste Beiträge
The answer to your second question can be found on the following message board thread:
https://www.liferay.com/community/forums/-/message_boards/message/37572364
https://www.liferay.com/community/forums/-/message_boards/message/37572364
Olaf Kock, geändert vor 9 Jahren.
RE: Send email in Freemarker Template
Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
Is it possible? Yes, see the other answers.
Should you do this? Most likely not. Freemarker Templates are view technology. Use your business layer to implement anything outside of the view realm, not templates. If this would go through my code review, I'd probably reject it unless you are implementing a very rare corner case or can really argue well for it (which I don't expect)
Should you do this? Most likely not. Freemarker Templates are view technology. Use your business layer to implement anything outside of the view realm, not templates. If this would go through my code review, I'd probably reject it unless you are implementing a very rare corner case or can really argue well for it (which I don't expect)