I’m using the PHPmotion script which has an internal messaging system user to user.
I’m looking for help with adding an option so that a user can choose to not use the system, and therefore when a message arrives to the 'turned-off" user, an auto-reply is sent notifying that this user is turned-off.
It looks like the code that actually sends the emails is lines 139-168 in the emailcompose.php file. I need help to modify lines 141-167 to create an email send function, then calling this function if the user wants to send an auto-response. And call the function every time the user receives a message, and check if they have auto-responses enabled. If they do, it’s sends the email. Unless you have a better idea. Any help will be appreciated. Here are the lines:
// send pm notification email to recipients registartion email addy
$email_template = 'email_templates/newmessage.htm';
$subject = $config['email_new_email'];
// at this point we do not have any email to send to
$to = $members_email;
$from = $config['notifications_from_email'];
//send email template to TBS for rendering of variable inside
$template = $email_template;
$inner_template1 = "themes/$user_theme/templates/inner_email_compose.htm";
$TBS = new clsTinyButStrong;
$TBS->NoErr = true;
$TBS->LoadTemplate("$template");
$TBS->tbs_show(TBS_NOTHING);
$message = $TBS->Source;
//load postage.php
include ('includes/postage.php');
$blk_notification = 1;
$message_type = $config['word_success']; // Success
$error_message = $config['error_25']; //25 == Request has been completed XXXXX=>success
unset($_SESSION['update_token']);
$_SESSION['update_token'] = '';
}