Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
blocks:app-note:sendloginmail [2020-11-12 10:47]
mattias [Installation]
blocks:app-note:sendloginmail [2023-08-01 21:05] (current)
admin [Installation]
Line 12: Line 12:
 {{ :blocks:app-note:sendemail:sendlogviaemail.zip |Download this ZIP file and unpack it}} {{ :blocks:app-note:sendemail:sendlogviaemail.zip |Download this ZIP file and unpack it}}
  
-If you don'know how to do this, read the instructions in the [[https://int.pixilab.se/docs/blocks/app-note/start|general setup section.]] This zip archive is a bit different from the other application notes, it has a blocks server config file and the root folder. The Blocks config file is a sample file showing the format of the mail settings that need to be set in your own blocks config file to enable the email feature in Blocks. +If you do not know how to do this, read the instructions in the [[blocks:app-note:start|general setup section]]This zip archive is a bit different from the other application notes, it has a blocks server config file and the root folder. The Blocks config file is a sample file showing the format of the mail settings that need to be set in your own blocks config file to enable the email feature in Blocks. 
  
-Prerequisits:+Prerequisites:
   * The root block has to be the default root folder name PIXILAB-Blocks-root unless changed in the user-script MailLog.ts.   * The root block has to be the default root folder name PIXILAB-Blocks-root unless changed in the user-script MailLog.ts.
-  * The server has to be a Linux server with zip installed.(it is installed in the Pixilab provided server image)+  * The server must be a Linux server with zip installed. (it is installed in the Pixilab provided server image)
   * The email account has to be configured in the [[blocks:server_configuration_file#top_level_mail_item|blocks server config file.]]   * The email account has to be configured in the [[blocks:server_configuration_file#top_level_mail_item|blocks server config file.]]
  
-Try the application:+=====Try the application=====
   - Start Blocks.   - Start Blocks.
   - Open the editor using the Admin button.   - Open the editor using the Admin button.
-  - Log in using the name admin and the password pixi.+  - Log in using the name admin and the password pixi 
 +  - Select the tasks page in the Blocks editor. 
 +  - Select the Logging task group  
 +  - Select the MailLog task. 
 +  - Change the receiving email address to you own. 
 +  - Run the task manually by hitting the tiny triangle play button next to the task. 
 + 
 +{{:blocks:app-note:sendemail:task.png?nolink&800|}} 
 + 
 +The task should be running for a couple of seconds at the most. Is it gets stuck until a timeout is reached, it indicates there is an issue with the email settings and the email server cannot be reached. 
 + 
 + 
 +The email look like this: 
 +{{:blocks:app-note:sendemail:email.png?nolink&800|}} 
 + 
 +Remember to check the spam folder if the email cannot be found in the inbox. 
 +  
 + 
 +=====How does it work?===== 
 + 
 +This application uses a user script that finds the latest log, zips it into a temp folder using the zip application installed on the server and then emails this on the recipient with the email feature built in to blocks. 
 + 
 +the script is stored at the default location /script/user/MailLog.ts 
 + 
 + {{:blocks:app-note:sendemail:atom.png?nolink&800|}}