How to let Sender know Recipient isn't receiving message?

In the PHPmotion web site script > My Profile > Email Notifications a user can select yes or no,
which can turn on or off the User from receiving email notifications that a private message has
been received into the User’s internal messaging inbox.

I’m looking for a solution that let’s the Sender(of an internal message) know that the User(recipient) isn’t receiving notifications by email.

In the emailcompose.php file these lines(below), are where I believe a modification can be added? Can you let me know if this is possible here?
Or how this can be accomplished? Any help will be appreciated.

if (notification_preferences($to_id, 'privatemessage') == true) {

// 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']	= '';
}
}

$_SESSION['update_token']	= '';
$show_form				= 0;
}

} else {

// START SHOW MESSAGE COMPOSE FORM
// Get to_id

$show_form	= 1;
$to_uid	= (int) mysql_real_escape_string($_GET['uid']);
$message_id = (int) mysql_real_escape_string($_GET['id']);

unset($_SESSION['update_token']);
$_SESSION['update_token']	= '';
$update_token			= random_token();
$_SESSION['update_token'] 	= $update_token;

//Check if member exists
if ( $to_uid != "" ) {

$sql = "SELECT user_name FROM member_profile WHERE user_id = $to_uid AND account_status = 'active'";
$result = @mysql_query($sql);

//Check if members is active
if (@mysql_num_rows($result) == 0 && $proceed == true) {
$blk_notification = 1;
$message_type	= $config['word_error'];
$error_message 	= $config['error_2'];//user could not be found

} else {
$result = @mysql_fetch_array($result);
$member_username = $result['user_name'];
}
}

It would seem you’ve already found it. the largest “else” in your currently pasted bit of code would be where the code goes to generate a private message without emailing…

Thanks for your reply.
Maybe my posting wasn’t clear, but, I’m not clear on what you’re saying.
Yes, currently User-A can choose not receive notification, by email, that a private message has been received, but the Sender (User-B) has no way of knowing that User-A has chosen not to be notified.
I’m looking for a solution that let’s the Sender(of an internal message) know that the User(recipient) isn’t receiving notifications by email. Any additional help will be welcomed. Much thanks

if (notification_preferences($to_id, 'privatemessage') == true) {
//User is accepting emails.
// ,,,
$show_form	= 0; //For reference of position in original code...
}
} else {
//User is Not Accepting emails. Spit message out somewhere in here.
//...

Thanks so much for your help/reply. Is it possible to get an example as to how to “Spit message out…” please? Much thanks again

Without context?

echo "This person is not receiving emails.";

Like this?

//....

$_SESSION[‘update_token’] = ‘’;
$show_form = 0;
}

} else {

//User is Not Accepting emails.

echo "This person is not receiving emails.";

// START SHOW MESSAGE COMPOSE FORM
// Get to_id

$show_form	= 1;
//....

Again, without context, yup, absolutely.

I’d like to try to add this code where if the recipient isn’t receiving messages than the ‘sender gets sent an email’ stating that “the recipient isn’t receiving messages”, so I’ve taken the existing code, added it after }else{ (below), but I don’t know how to modify that code to make it so the ‘sender gets an email’. Any help with this will be appreciated.

} else {

// check if receipients allow notifications if yes , send them a notification that they have an message

        		// send pm notification email to recipients registration 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']	= '';

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.