GlisWeb framework
_mail.php
Vai alla documentazione di questo file.
1 <?php
2 
14  // inclusione del framework
15  require '../../../_src/_config.php';
16 
17  // output
18  $tx = NULL;
19 
20  // numero di mail in coda
21  $t = mysqlSelectValue( $cf['mysql']['connection'], 'SELECT count( id ) FROM mail_out' );
22 
23  // debug
24  // var_dump( $t );
25 
26  // accodamento o evasione
27  if( $t == 0 ) {
28 
29  // output
30  $tx = 'accodamento mail...';
31 
32  // accodamento
33  queueMail(
34  $cf['mysql']['connection'],
35  strtotime( '+1 minute' ),
36  array( 'Fabio Mosti' => 'fabio.mosti@gmail.com' ),
37  array( 'Fabio Mosti' => 'fabio@videoarts.eu', 'Fabio LdF' => 'fabio.mosti@illettoredifantasia.it' ),
38  'prova mail GlisWeb',
39  'Testo della mail di prova',
40  array( 'Fabio Mosti' => 'sean_von_drake@hotmail.com' )
41  );
42 
43  } else {
44 
45  // output
46  $tx = 'evasione mail...';
47 
48  // mando il task in modalità interattiva
49  define( 'CRON_RUNNING', true );
50 
51  // evasione
52  require DIRECTORY_BASE . '_src/_api/_task/_mail.queue.send.php';
53 
54  }
55 
56  // output
57  build( $tx );
58 
59 ?>
$t
Definition: _mail.php:21
$cf['ricerca']['template']
Definition: _030.common.php:7
queueMail( $c, $timestamp_invio, $mittente, $destinatari, $oggetto, $corpo, $destinatari_cc=array(), $destinatari_bcc=array(), $allegati=array(), $headers=array(), $server=NULL)
accoda una mail
mysqlSelectValue( $c, $q, $p=false, &$e=array())
const DIRECTORY_BASE
Definition: _osm.php:3
$tx
Definition: _mail.php:18
build( $content, $type=MIME_TEXT_PLAIN, $encoding=ENCODING_UTF8, $headers=array())