cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to see rendered email

Former Member
0 Likes
324

Hi, I would need to see all the email that the system sends to the user but not in HTML/Velocity format. Obviously, I can't use the production environment for sending the e-mail, I need a way to see and save (in a png or something like that) the rendered email. (like content studio in marketing)

Thanks in advance,

Federico

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

Hi

The process engine that sends the emails contains different tasks, let me quote one as an example forgottenPasswordEmailProcess.xml. Let us examine the actions and transitions mentioned:

 <process xmlns="http://www.hybris.de/xsd/processdefinition" start="generateForgottenPasswordEmail" name="forgottenPasswordEmailProcess"
         processClass="de.hybris.platform.commerceservices.model.process.ForgottenPasswordProcessModel" onError="error">
 
     <action id="generateForgottenPasswordEmail" bean="generateForgottenPasswordEmail">
         <transition name="OK" to="sendEmail"/>
         <transition name="NOK" to="error"/>
     </action>
 
     <action id="sendEmail" bean="sendEmail">
         <transition name="OK" to="removeSentEmail"/>
         <transition name="NOK" to="failed"/>
     </action>
 
     <action id="removeSentEmail" bean="removeSentEmail">
         <transition name="OK" to="success"/>
         <transition name="NOK" to="error"/>
     </action>
     
     <end id="error" state="ERROR">Something went wrong.</end>
     <end id="failed" state="FAILED">Could not send forgotten password email.</end>
     <end id="success" state="SUCCEEDED">Sent forgotten password email.</end>
 
 </process>

The removeSentEmail action removes the email (from the database) that was sent to the user.

So you can see the email sent to the customer by removing the removeSentEmail action in the process xml (not in prod) and see the emails sent.

To save the email, you can use the bcc address to retain a copy of the email to an inbox.

Hope this answers your question.

Answers (0)