All pastes #804334 Raw Edit

sendpm example

public php v1 · immutable
·published 2007-12-03 11:24 UTC
rendered paste body
// Who is sending the IM$pmfrom = array(	'id' => $ID_MEMBER,	'name' => $context['user']['name'],	'username' => $context['user']['username']);// 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'], $ID_MEMBER, $context['user']['name'], $row['name'], formatMoney($row['tradecost']));// Send the PMsendpm($pmto, $subject, $message, 0, $pmfrom);