Galette API documentation
Gestionnaire d’Adhérents en Ligne Extrêmement Tarabiscoté mais Tellement Efficace
1.0.0
Galette\Core\GaletteMail Class Reference
Inheritance diagram for Galette\Core\GaletteMail:

Public Member Functions

 __construct (Preferences $preferences)
 
 setRecipients (array $recipients)
 
 send ()
 
 isHTML (bool $set=null)
 
 getSenderName ()
 
 getSenderAddress ()
 
 getSubject ()
 
 getErrors ()
 
 getMessage ()
 
 getWrappedMessage ()
 
 setSubject (string $subject)
 
 setMessage (string $message)
 
 setSender (string $name, string $address)
 
 setTimeout (int $timeout)
 

Static Public Member Functions

static isValidEmail (string $address)
 
static isUrl (string $url)
 

Public Attributes

const MAIL_ERROR = 0
 
const MAIL_SENT = 1
 
const METHOD_DISABLED = 0
 
const METHOD_PHPMAIL = 1
 
const METHOD_SMTP = 2
 
const METHOD_QMAIL = 3
 
const METHOD_GMAIL = 4
 
const METHOD_SENDMAIL = 5
 
const SENDER_PREFS = 0
 
const SENDER_CURRENT = 1
 
const SENDER_OTHER = 2
 

Protected Member Functions

 cleanedHtml ()
 
 getPhpMailer ()
 

Protected Attributes

array $attachments = array()
 

Detailed Description

Generic email for Galette

Author
Johan Cwiklinski johan.nosp@m.@x-t.nosp@m.nd.be

Constructor & Destructor Documentation

◆ __construct()

Galette\Core\GaletteMail::__construct ( Preferences  $preferences)

Constructor

Parameters
Preferences$preferencesPreferences instance

Member Function Documentation

◆ cleanedHtml()

Galette\Core\GaletteMail::cleanedHtml ( )
protected

Clean a string embedding html, producing AltText for html emails

Returns
string current message in plaintext format

◆ getErrors()

Galette\Core\GaletteMail::getErrors ( )

Retrieve array of errors

Returns
array<int,string>

◆ getMessage()

Galette\Core\GaletteMail::getMessage ( )

Get the message

Returns
string The message

◆ getPhpMailer()

Galette\Core\GaletteMail::getPhpMailer ( )
protected

Retrieve PHPMailer main object

Returns
PHPMailer object

◆ getSenderAddress()

Galette\Core\GaletteMail::getSenderAddress ( )

Get sender address

Returns
string

◆ getSenderName()

Galette\Core\GaletteMail::getSenderName ( )

Get sender name

Returns
string

◆ getSubject()

Galette\Core\GaletteMail::getSubject ( )

Get the subject

Returns
string The subject

◆ getWrappedMessage()

Galette\Core\GaletteMail::getWrappedMessage ( )

Get the message, wrapped

Returns
string Wrapped message

◆ isHTML()

Galette\Core\GaletteMail::isHTML ( bool  $set = null)

Is the email HTML formatted?

Parameters
?boolean$set The value to set
Returns
bool

◆ isUrl()

static Galette\Core\GaletteMail::isUrl ( string  $url)
static

Check if a string is an url

Parameters
string$urlthe url to check
Returns
bool

◆ isValidEmail()

static Galette\Core\GaletteMail::isValidEmail ( string  $address)
static

Check if an email address is valid

Parameters
string$addressthe email address to check
Returns
bool

◆ send()

Galette\Core\GaletteMail::send ( )

Apply final header to email and send it :-)

Returns
integer Either GaletteMail::MAIL_ERROR|GaletteMail::MAIL_SENT

Reimplemented in Galette\Core\Mailing.

◆ setMessage()

Galette\Core\GaletteMail::setMessage ( string  $message)

Sets the message

Parameters
string$messageThe message
Returns
self

◆ setRecipients()

Galette\Core\GaletteMail::setRecipients ( array  $recipients)

Sets the recipients For mailing convenience, all recipients will be added as BCC, regular recipient will be the sender.

Parameters
array<string,string>$recipients Array (mail=>name) of all recipients
Returns
bool

Reimplemented in Galette\Core\Mailing.

◆ setSender()

Galette\Core\GaletteMail::setSender ( string  $name,
string  $address 
)

Sets the sender

Parameters
string$nameSender name
string$addressSender address
Returns
self

◆ setSubject()

Galette\Core\GaletteMail::setSubject ( string  $subject)

Sets the subject

Parameters
string$subjectThe subject
Returns
self

◆ setTimeout()

Galette\Core\GaletteMail::setTimeout ( int  $timeout)

Set timeout on SMTP connexion

Parameters
integer$timeoutSMTP timeout
Returns
self

The documentation for this class was generated from the following file: