From 1e061bef52b79ed95436759a724ab7992c84a674 Mon Sep 17 00:00:00 2001 From: Amigo <49749100+aamigo@users.noreply.github.com> Date: Wed, 3 Jul 2019 12:30:34 +0200 Subject: [PATCH] Updated 025 How to use email helper in your components (markdown) --- 025-How-to-use-email-helper-in-your-components.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/025-How-to-use-email-helper-in-your-components.md b/025-How-to-use-email-helper-in-your-components.md index 4889196..1d9ca1c 100644 --- a/025-How-to-use-email-helper-in-your-components.md +++ b/025-How-to-use-email-helper-in-your-components.md @@ -49,14 +49,16 @@ These(see video) are the DKIM values that would be needed in the component to be ### Error Checking For Emails In Code -If for instance an error occurres, then it verifies whether the component Helper Class, (this file 'learningmanagerhelper'). has a 'storemessage' variable or method. [00:09:31](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m31s) It can be seen that there is the 'storemessage' method in the Helper Class. This is a custom method had been written by VDM. It may be written anywhere, but the signature should be the same. [00:10:00](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m00s) These(See video) 'learningmanager' areas is dynamically updated to your component. It uses the component name 'learningmanager' and the component name 'learningmanager'. But this 'storemessage' cannot be changed, but it takes the 'send email', the 'recipient', the 'subject', the 'body', the 'text only', the 'mode' and indicates that it is 'email'. So there may be different types, and looking at the method, the type can be anything. [00:10:30](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m30s) Different things need to be done on the various types. If the SMS didn't fail, the message needs to be stored. This kind of feature isn't only used when something didn't work, but also when it worked. If it had been send, it will be stored.<<<<<<<< - - - So it's a way to store the message,myou can [00:10:57](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m57s) let your user go, if they login, they can see messages sent to them and this kind of stuff. This is what the store message does. You will see that it's whole huge custom method that I wrote. You can update it and change it, pause the video, copy it down. If you realize this is actually something you write up yourself you just need to make sure that that part is the same. The rest is up to you how you deal with it. That is implementing the learning manager emailer [00:11:35](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m35s) in your component. +If for instance an error occurres, then it verifies whether the component Helper Class, (this file 'learningmanagerhelper'). has a 'storemessage' variable or method. [00:09:31](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m31s) It can be seen that there is the 'storemessage' method in the Helper Class. This is a custom method that had been written by VDM. It may be written anywhere, but the signature should be the same. [00:10:00](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m00s) These(See video) 'learningmanager' areas is dynamically updated to your component. It uses the component name 'learningmanager' and the component name 'learningmanager'. But this 'storemessage' cannot be changed, but it takes the 'send email', the 'recipient', the 'subject', the 'body', the 'text only', the 'mode' and indicates that it is 'email'. So there may be different types, and looking at the method, the type can be anything. [00:10:30](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m30s) Different things need to be done on the various types. If the SMS didn't fail, the message needs to be stored. This kind of feature isn't only used when something didn't work, but also when it worked. If it had been send, it will be stored. [00:10:57](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m57s) So it's a way to store the message, so that the users, if they login, can see messages sent to them. That is the function of the Store Message. This Custom Method can be updated and changed, (pause the video), copy it. If you had written it just make sure that that part 'storemessage' is the same. [00:11:35](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m35s) That is implementing the Learning Manager Emailer in your component. ### Implemented Example -Maybe I should show you where I implemented at least in one area. I have this component called job tracking system. I open it up, you'll see that it actually has that function: Add email helper. Set it to on. The view in which we are using the email method is the job order view. Basically we want to email the client, it did a job order [00:12:21](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m21s) when it's created. So let me show you how I implemented it there. So here is the job order. I would basically then click on email. I can update it to whatever email I like, [00:12:45](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m45s) testing@vdm.io or something. Just send it in to nothing. Then once the email has been sent, it let's me know. In the top right it says email was sent successfully. That's basically what the emailer does. It just this button that sends the document [00:13:11](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m11s) to my client. If I want to send it to my store, the people that does the job, I could also do that here. I'm not going to explain to you the reality of taking this content, adding it to the email and sending it. That I would suspect you need to know and you need to learn or study to do that yourself. I'm simply explaining to you how to use the email helper class. +Here follows a example of how it is implemented at least in one area. For instance here is this component, Job Tracking System. It has that function: Add Email Helper. Set it to 'On'.The view(Admin View) in which the email method is used, is the 'Job Order' view. In this case the client needs to be emailed when a job order had been created. [00:12:21](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m21s) + +This is how it is implemented.(See video) Here is the Job Order. When Email is selected it may be updated to any preferred email. like for example: 'testing@vdm.io'. [00:12:45](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m45s) Once the email has been sent, it will be confirmed in the top right. [00:13:11](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m11s)It is this button that sends the document to the client.<<<<<<<<<<<<<<<<<<<<<<<<<<<<<, + + + ### Above Example In Code