Updated 025 How to use email helper in your components (markdown)

Amigo 2019-07-04 09:48:14 +02:00
parent 8651f828d5
commit c8881db0e4
1 changed files with 1 additions and 1 deletions

@ -65,4 +65,4 @@ In the 'Job Order' is a JavaScript area. The Send Email function may be seen whi
In the 'Job Order' is a PHP area. How to use the Ajax class had been explained in previous tutorials but just a brief touch on it again. [00:14:47](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m47s) Here is the input(ajax input) where the controller has to be set up . In the controller there is 'sendEmail' class that was defined in this field (see video). [00:15:12](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m12s) There are three variables, and should be filtered and are transfered to these methods and then should be logged in 'User' by selecting 'Yes'. Looking at the code, again this is the task 'sendEmail', it triggers the task and checks for those values, then transfers it to this method 'sendMail' which is in the model. Go to Models and to Ajax. Scroll down to the 'sendEmail'. [00:15:47](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m47s) This is a Custom Script. In closing this, the Ajax method can be seen. This is another Custom method which had been written by VDM, it's called sendEmail, it gets the 'mail', the 'HTML' and the 'type'. It it does the necessary cleansing etc. [00:16:14](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m14s) The Email Helper is requested. Then the 'Send' method is used and the variables are transfered. Then set the 'result'. If the result is 'true', the user is notified, otherwise he receives the 'error'. [00:16:38](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m38s)
This email body is of great help to build the email and it ensures that it contains the necessary HTML etc.(https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m15s) The HTML and subject can be passed to it and it simply adds the subject to the email [00:17:15] and the necessary places as well as the body($body[]_$html) in the necessary place, and gets send in a appropriate way. A custom method is passed which gets the data from the Ajax and then sends it. [00:17:43](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m43s) That's a quick tutorial on how to implement sending emails through your component, using the Email Helper Class. The Email Helper Class is available on GitHub in the Component Builder.
This email body is of great help to build the email and it ensures that it contains the necessary HTML etc.[00:17:15](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m15s) The HTML and subject can be passed to it and it simply adds the subject to the email and the necessary places as well as the body($body[]_$html) in the necessary place, and gets send in a appropriate way. A custom method is passed which gets the data from the Ajax and then sends it. [00:17:43](https://www.youtube.com/watch?v=tp6mMUTOF2Y&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m43s) That's a quick tutorial on how to implement sending emails through your component, using the Email Helper Class. The Email Helper Class is available on GitHub in the Component Builder.