500 error on sending automatic mail to users on creating a new item (like a blog) #2762
dennisfrijlink
announced in
Archive
Replies: 4 comments 1 reply
-
That "notify" function is just an example of where you can inject your own logic. You could use something like |
Beta Was this translation helpful? Give feedback.
0 replies
-
Aah okay. You maybe have an example of mail in PHP?
Op ma 22 jun. 2020 om 17:32 schreef Rijk van Zanten <
[email protected]>:
… That "notify" function is just an example of where you can inject your own
logic. You could use something like mail in PHP (
https://www.php.net/manual/en/function.mail.php) or rely on an external
service like Sendgrid <https://sendgrid.com/> etc.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2762 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHSZOR2WBWFWGQB375E6PPTRX52PDANCNFSM4ODPDYWQ>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Yeah okay. But how to use it with directus was more my question 😅
Op di 23 jun. 2020 18:10 schreef Rijk van Zanten <[email protected]>:
… See my response above, I already provided a couple 🙂
You could use something like mail in PHP (
https://www.php.net/manual/en/function.mail.php) or rely on an external
service like Sendgrid etc.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2762 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHSZORYZ6XYKKEJK6XNYI43RYDHWJANCNFSM4ODPDYWQ>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
[image: image.png]
This code above isn't working
Op di 23 jun. 2020 om 18:10 schreef Rijk van Zanten <
[email protected]>:
… See my response above, I already provided a couple 🙂
You could use something like mail in PHP (
https://www.php.net/manual/en/function.mail.php) or rely on an external
service like Sendgrid etc.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2762 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHSZORYZ6XYKKEJK6XNYI43RYDHWJANCNFSM4ODPDYWQ>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to understand how I the Hooks in Directus work and what I have to do to mail all registered users when I create a new item (it's a for a personal blog). I've read the documentation on your website and tried the code below:
<?php return [ 'actions' => [ 'item.create.articles' => function ($data) { $content = 'New article was created with the title: ' . $data['title']; notify('[email protected]', 'New Article', $content); }]]
but it doesn't work. I get a 500 error.
Someone can please help me?
Beta Was this translation helpful? Give feedback.
All reactions