Hello Oazar!
I added some submit hooks to the development version:
https://github.com/Asgaros/asgaros-forum/commit/56cc13648d023d957573613826caaa3d9a5eeea1
They will be accessible via your themes functions.php file:
function after_submit($post_id) {
// Your code here ...
}
add_action('asgarosforum_after_thread_submit', 'after_submit');
add_action('asgarosforum_after_post_submit', 'after_submit');
add_action('asgarosforum_after_edit_submit', 'after_submit');
The ID allows you to access all fields in the database. This can be used to get information about subject/content/author for example.
Those kind of information can be used inside your mail if you want. Here is an example on how to send a mail via PHP:
https://stackoverflow.com/a/5335311/4919483
So your code in your themes functions.php file code be something like this:
function after_submit($post_id) {
global $wpdb;
$post = $wpdb->get_row($wpdb->prepare("SELECT text FROM wp_forum_posts WHERE id = %d;", $post_id));
$to = '[email protected]';
$subject = 'New post/thread';
$message = "A new post/thread has been created:\r\n".$post->text;
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
}
add_action('asgarosforum_after_thread_submit', 'after_submit');
add_action('asgarosforum_after_post_submit', 'after_submit');
add_action('asgarosforum_after_edit_submit', 'after_submit');