Bored? Looking to kill some time? Want to chat with other SMF users? Join us in IRC chat or Discord
Started by Jotade29, April 27, 2022, 08:24:08 PM
// Who is receiving the IM $pmto = array( 'to' => array($row['ownerid']), 'bcc' => array() ); // The message subject $subject = sprintf($txt['shop_im_trade_subject'], $row['name']); // The actual message $message = sprintf($txt['shop_im_trade_message'], $context['user']['id'], $context['user']['name'], $row['name'], formatMoney($row['tradecost'])); // Send the PM sendpm($pmto, $subject, $message, 0, $pmfrom); $context['shop_buy_message'] = sprintf($txt['shop_trade_bought_item'], $row['name'], $row['real_name']);
array sendpm(array recipients, string subject, string message, bool store_outbox = false, array from = current_member, int pm_head = 0) - sends an personal message from the specified person to the specified people. (from defaults to the user.) - recipients should be an array containing the arrays 'to' and 'bcc', both containing id_member's. - subject and message should have no slashes and no html entities. - pm_head is the ID of the chain being replied to - if any. - from is an array, with the id, name, and username of the member. - returns an array with log entries telling how many recipients were successful and which recipients it failed to send to.
Quote- from is an array, with the id, name, and username of the member.
$pmfrom= array( 'id'=> 2, 'name'=>'nombre', 'username'=>'username', );