🌍
English
This is an old revision of the document!
This page only applies to Piwigo 2.6 and newer.
Piwigo integrates a powerful mailing function compatible with standard PHP mail() function and SMTP servers. It is base on PHPMailer and Emogrifier libraries.
There are four functions to send emails:
pwg_mail() takes three parameters, for basic usage you only need to use the first and the second one.
The first parameter is the recipient(s) of the mail, it can be either:
name@domain.com
Name <name@ domain.com>
$recipients = array( array('name' => 'Name 1', 'email' => 'name1@domain.com'), array('name' => 'Name 2', 'email' => 'name2@domain.com'), );
The second parameter is an array of options:
from
- sender of the email [defaults to webmaster email and gallery name]Cc
- carbon copy recipients as array [defaults to empty]Bcc
- blind carbon copy recipients as array [defaults to empty]subject
- subject of the email [defaults to 'Piwigo']content
- content of the emailcontent_format
- text/html or text/plain [defaults to 'text/plain']email_format
- text/html or text/plain [defaults to 'text/html'] will be forced to 'text/plain' if webmaster disabled HTML emailstheme
- clear or dark [defaults to $conf['mail_theme']]mail_title
- main title in email corpus [defaults to $conf['gallery_title']]mail_subtitle
- subtitle in email corpus [defaults to subject]]
If you set subject to [something] something else
and leave mail_title and mail_subtitle empty, you will get:
mail_title = something
mail_subtitle = something else
This is for backward compatibility only.