How to set text file contents as email body

Post Reply
mrkkrai
Member
Posts: 27
Joined: Thu Mar 17, 2016 4:31 pm

How to set text file contents as email body

Post by mrkkrai »

Hi:

Please help me to set text file contents as email body of Mail send configurator.

Thanks
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: How to set text file contents as email body

Post by jan_suhr »

You can add the text file as an Opaque dataset to the job in the flow.

Then in the Email configurator you pick up that Dataset as a Template dataset with the Body template as Associated with job
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
mrkkrai
Member
Posts: 27
Joined: Thu Mar 17, 2016 4:31 pm

Re: How to set text file contents as email body

Post by mrkkrai »

Thanks a ton sir...

I tried and succeeded.

Is there any possibility to email some particular text from that text file?
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: How to set text file contents as email body

Post by jan_suhr »

You can have Switch variables as markers in the text file and from that add text to the mail.

But if you need to edit the text it has to be done before it becomes a dataset.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
mrkkrai
Member
Posts: 27
Joined: Thu Mar 17, 2016 4:31 pm

Re: How to set text file contents as email body

Post by mrkkrai »

Is there any way to convert text file to xml so that I can use XML Pickup?
Pantone485
Newbie
Posts: 3
Joined: Tue Mar 09, 2021 8:41 pm

Re: How to set text file contents as email body

Post by Pantone485 »

Hey!

I am new on Switch but think it is extremely fun and powerful tool.

I have set up a flow that sorts pdf files according to number of pages. There are 5 different variants, 2, 4, 6, 8 and everything over 8 pages.
Then the files are collected so that all 2-pages, 4-pages, etc. end up in the same file. Then an email is sent with a summary of how many of each variant. Everything works well so far. The problem is when I want to use my own "HTML Template" for mail send
If I send the email as plain text, it goes well. If I send as HTML and use a "Built-in" template, it works fine, but if I use my own template, I do not get the text. Which variable should I use to trigger my info? Or where can I find the "Built-in" template and can edit it? Please see attached photos. Thanks in advance!
The attachment Plain text.png is no longer available
The attachment Enfocus_HTML.png is no longer available
Plain text.png
Plain text.png (27.37 KiB) Viewed 10775 times
Pantone485
Newbie
Posts: 3
Joined: Tue Mar 09, 2021 8:41 pm

Re: How to set text file contents as email body

Post by Pantone485 »

Enfocus_HTML.png
Enfocus_HTML.png (97.33 KiB) Viewed 10774 times
Own_HTML.png
Own_HTML.png (21.05 KiB) Viewed 10774 times
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: How to set text file contents as email body

Post by jan_suhr »

In your own HTML-template you insert Switch variables with the information you want to display in the email.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Pantone485
Newbie
Posts: 3
Joined: Tue Mar 09, 2021 8:41 pm

Re: How to set text file contents as email body

Post by Pantone485 »

jan_suhr wrote: Thu Mar 11, 2021 6:00 pm In your own HTML-template you insert Switch variables with the information you want to display in the email.
Yes, I agree. The problem is that I do not know what "Switch variable" I should use. I have tried several different but without success. (see attached file) If I were to access the "built.-in" template, can I see what it looks like or do you know which variable (s) I should choose? Thanks in advance!
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: How to set text file contents as email body

Post by jan_suhr »

I see that you are from Sweden, call me at 0707490774 and I can take a look at it.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
essexmate
Member
Posts: 30
Joined: Tue Sep 05, 2017 4:41 pm

Re: How to set text file contents as email body

Post by essexmate »

Pantone485 wrote: Fri Mar 12, 2021 3:28 pm
jan_suhr wrote: Thu Mar 11, 2021 6:00 pm In your own HTML-template you insert Switch variables with the information you want to display in the email.
Yes, I agree. The problem is that I do not know what "Switch variable" I should use. I have tried several different but without success. (see attached file) If I were to access the "built.-in" template, can I see what it looks like or do you know which variable (s) I should choose? Thanks in advance!
In your html you need to insert your switch variable inbetween <span> </span>

example:

Code: Select all

<p>Hello <span>[Job.UserFullName]</span></p>
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: How to set text file contents as email body

Post by freddyp »

Putting the Switch variable in between a <span> construction is not necessary. It can be anywhere in the HTML as long as you take care to keep the HTML structure valid after the value of the variable is inserted. Here is an example that uses two Switch variables:
  • the name of the job: [Job.Name]
  • the link to the document on the PDF Review Server:[ Job.PrivateData:Key="com.enfocus.PDFReviewModule.URL"]
The example displays only the name of the job in some kind of blue to indicate that it is a link. The link itself is not displayed but clicking on the name of the job will jump to it:

Code: Select all

<a href="[Job.PrivateData:Key="com.enfocus.PDFReviewModule.URL"]" style="color:#337ab7; text-decoration: none;"><font face="Arial, Helvetica, sans-serif" color="#337ab7" size="2" style="font-size:16px;">[Job.Name]</font></a>
Post Reply