MyBB Community Forums

Full Version: sending PM
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So these are my codes, it's approve/deny button taken from .. and I was wondering if it's possible to send email to the person i approve as well after clicking the Approve button (with subject,content,recipents all filled up and auto send)

I have tried redirecting to https://MYFORUM/private.php?action=send , but couldn't figure out how to fill the info in automatically

<!--- Approve/Deny Buttons --->
		<if (($post['usergroup'] == 2) and ($forum['fid'] == 8) and ($post['pid'] == $thread['firstpost']) and ($thread['closed'] == 0)) then>

<!--- Donator Approve --->
<div class="postbit_buttons author_buttons" style="text-align: center; padding-top:15px;">
<if (($GLOBALS['mybb']->user['usergroup'] == 4) || ($GLOBALS['mybb']->user['usergroup'] == 8) || ($GLOBALS['mybb']->user['usergroup'] == 13)) then><span class="staff" style="color: #fcfbf7; text-shadow: 1px 1px 3px #000000;font-weight:bold;);">Donator</span><br />
<form action="admin/index.php?module=user-users&amp;action=edit&amp;uid={$post['uid']}" style ="display: inline-block;" method="post" enctype="multipart/form-data" target="_blank" id="certform">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="hidden" name="username" value="{$post['username']}" />
<input type="hidden" name="email" value="{$post['email']}" />
<input type="hidden" name="displaygroup" value="0" />
<input type="hidden" name="postcount" value="{$post['postnum']}" />
<input type="hidden" name="usergroup" value="11" />
<input type="hidden" checked="checked" value="1" name="showimages">
<input type="hidden" checked="checked" value="1" name="showvideos">
<input type="hidden" checked="checked" value="1" name="classicpostbit">
<input type="hidden" name="invisible" value="0">
<input type="hidden" checked="checked" value="1" name="allownotices">
<input type="hidden" checked="checked" value="1" name="receivepms">
<input type="hidden" checked="checked" value="1" name="pmnotice">
<input type="hidden" checked="checked" value="1" name="showsigs">
<input type="hidden" checked="checked" value="1" name="showavatars">
<input type="hidden" checked="checked" value="1" name="showquickreply">
<input type="submit" value="Approve" class="approveapp" style="background: #252525; color: #c9c9c9; margin: 2px; padding: 4px 8px; border-width: 3px; border-color: green; border-radius: 5px; width: 75px;" />
<form action="{$mybb->settings['bburl']}/moderation.php" style ="display: inline-block" method="post" >
<input type="hidden" name="tid" value="{$thread['tid']}" />
<input type="hidden" name="action" value="openclosethread" />
<input type="hidden" name="action" value="openclosethread" />
<input type="submit" value="Deny" class="declineapp" style="background: #252525; color: #c9c9c9; margin: 2px; padding: 4px 8px; border-width: 3px; border-color: red; border-radius: 5px; width: 75px;" />

<script src=""></script> 
       $(document).ready(function () {
          $('#certform').ajaxForm(function () {