Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Using transformation in an email View modes: 
User avatar
Member
Member
Skip - 9/24/2012 12:17:33 PM
   
Using transformation in an email
I need to take the information from a web form and format it into an email message. The formatting needs to be in a very specific format. I need to do this through a custom table rather than a bizform because there is other processing that I need to do with the information, but I would like to send the information from the form to both the people that need a notification of the entry as well as the person that entered the information.

After saying that, I was wondering if there was a way to use a transformation to build the formatting of the email message? Is there a way that I can read the transformation? I can write the routine to convert the placeholders into the form fields.

By chance, is this something that has been addressed in newer releases. We are on 5.5R2.

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 9/25/2012 5:08:22 AM
   
RE:Using transformation in an email
Hello,


I am not sure why you need to use transformations. You can use the e-mail templates:
E-mail templates documentation
How to send an email using the email template by API

Version 6 allows applying transformations to macros: Transformations in macro expressions which you can use on the e-mail template.

If you have any questions, feel free to ask.


Best regards,
Helena Grulichova

User avatar
Member
Member
Skip - 9/25/2012 7:21:32 AM
   
RE:Using transformation in an email
Well, I feel like a real idiot. I must have been sleeping that day of class.

Thanks.

User avatar
Member
Member
Skip - 9/25/2012 9:52:06 AM
   
RE:Using transformation in an email
OK, I will ask another stupid question. The email will format the information for the email. What is the best way to format the information back to the browser in a printable format (not in the form fields). To use a transformation for that, I would have to read the record back from the database, correct?

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 9/26/2012 3:25:33 AM
   
RE:Using transformation in an email
Hello,


Yes, you would need to read the record from the database and then print it by transformation or API. This article can be helpful for you: Print page.

However, if you insert the item by API, it is possible to load the data just after you insert the item without loading from the database. You can, for example, insert the HTML code with the item data to a literal on the page.


Best regards,
Helena Grulichova