Loading text from a file to send in body of HTML email

More
2 years 4 months ago #23611 by prashant
This is in context to www.etl-tools.com/forum/advanced-etl-pro...multiples-files.html

Now I have multiple xls or csv file containing orders of a salesman . 

Is it possible to send items in body of an email instead of attachment

Dear XYZ,
Please see the orders you made

Order ID,Salesman Name,Customer Name,Product Name,Quantity,Unit Price,Order Date,Delivery Date
001,Prashant,John's Boutique,Men's Leather Oxford Shoes,150,2000,2024-04-17,2024-05-17
002,Prashant,Elite Footwear,Ladies' Casual Sneakers,200,1500,2024-04-17,2024-05-17
003,Prashant,The Shoe Stop,Men's Running Shoes,120,1800,2024-04-17,2024-05-17
004,Prashant,Fashion Feet,Women's High Heels,85,2200,2024-04-17,2024-05-17

Cheers,
PM 


 
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

More
2 years 4 months ago #23613 by admin

Please Log in or Create an account to join the conversation.

More
2 years 4 months ago #23614 by prashant
Can I use loop to read location of multiple files from a csv and then pass to email package?

Please Log in or Create an account to join the conversation.

More
2 years 4 months ago #23615 by admin
Yes you can

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago #23874 by prashant
Hellos,
I am now trying to load the file whose location is saved in a CSV , 

I am using LOOP action to iterate through files and send the file location 



My script , how do I pass the variable for #file# ? I know I have to use  {GetVariable('#file#')}, but for life of me , dont' know next steps



begin
Code:
SetVariable('',FileToString('C:\tmp\text.txt')); Result:=True; end;

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago #23880 by admin
This should work
Code:
begin SetVariable('#file-content#',FileToString(GetVariable('#file#'))); Result:=True; end;

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save