Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: SaikoJosh - maaliskuu 01, 2006, 02:39:27 IP

Otsikko: How do I setup the array for the sendpm() function?
Kirjoitti: SaikoJosh - maaliskuu 01, 2006, 02:39:27 IP
How do I setup the array for the sendpm() function?

Can someone give me a simple example, I couldn't get to grips with the SMF code...


P.S. I tried to search for this but apparently "How to setup array for sendpm() function" (match all words) is not a specific enough search query. ::)
Otsikko: Re: How do I setup the array for the sendpm() function?
Kirjoitti: sm2k - maaliskuu 01, 2006, 06:08:01 IP
The search feature pukes on parenthesis.  If you just search for sendpm you'll find a lot of stuff.  Here's a post with an example:

http://www.simplemachines.org/community/index.php?topic=24450.0
Otsikko: Re: How do I setup the array for the sendpm() function?
Kirjoitti: Thantos - maaliskuu 01, 2006, 07:24:23 IP
   array sendpm(array recipients, string subject, string message,
         bool store_outbox = false, array from = current_member)
      - 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_MEMBERs.
      - subject and message should have no slashes and no html entities.
      - 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.
Otsikko: Re: How do I setup the array for the sendpm() function?
Kirjoitti: SaikoJosh - maaliskuu 02, 2006, 12:51:56 IP
Cheers sm2k, thats exactly what I needed. :D