10-08-2020, 04:20 PM
(This post was last modified: 10-08-2020, 04:22 PM by joebordes.
Edit Reason: forgot link
)
If the code above is all the code you have you are missing some includes and I do not know what this method is:
$emailid = Emails::createEmailRecord($element);
that is a static method call on a function inside the Emails object. As far as I can see that method does not exist in a standard corebos so you may have added it yourself and I don't know what it contains.
You don't need to add any function
You just include modules/Emails/mail.php and you get the function createEmailRecord($email) already available for you.
Have a read at this blog post see if that helps. Compare your createEmailRecord method with the function in mail.php and let me know how it goes.
https://blog.corebos.org/blog/sendemail
$emailid = Emails::createEmailRecord($element);
that is a static method call on a function inside the Emails object. As far as I can see that method does not exist in a standard corebos so you may have added it yourself and I don't know what it contains.
You don't need to add any function
You just include modules/Emails/mail.php and you get the function createEmailRecord($email) already available for you.
Have a read at this blog post see if that helps. Compare your createEmailRecord method with the function in mail.php and let me know how it goes.
https://blog.corebos.org/blog/sendemail
Joe
TSolucio
TSolucio