\MailCore

Summary

Methods
Properties
Constants
Send()
eraseAllLogs()
sendMailTest()
l()
isMultibyte()
mimeEncode()
$id
$recipient
$template
$subject
$id_lang
$date_add
$definition
TYPE_HTML
TYPE_TEXT
TYPE_BOTH
generateId()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

TYPE_HTML

TYPE_HTML

TYPE_TEXT

TYPE_TEXT

TYPE_BOTH

TYPE_BOTH

Properties

$id

$id : 

Type

$recipient

$recipient : string

Type

string — Recipient

$template

$template : string

Type

string — Template

$subject

$subject : string

Type

string — Subject

$id_lang

$id_lang : \unsigned

Type

\unsigned — integer Language ID

$date_add

$date_add : \timestamp

Type

\timestamp — Date

$definition

$definition : 

Type

Methods

Send()

Send(integer  $id_lang, string  $template, string  $subject, string  $template_vars, string  $to, string  $to_name = null, string  $from = null, string  $from_name = null, array  $file_attachment = null,   $mode_smtp = null, string  $template_path = _PS_MAIL_DIR_, boolean  $die = false,   $id_shop = null, string  $bcc = null) 

Send Email

Parameters

integer $id_lang

Language of the email (to translate the template)

string $template

Template: the name of template not be a var but a string !

string $subject
string $template_vars
string $to
string $to_name
string $from
string $from_name
array $file_attachment

Array with three parameters (content, mime and name). You can use an array of array to attach multiple files

$mode_smtp
string $template_path
boolean $die
$id_shop
string $bcc

Bcc recipient

eraseAllLogs()

eraseAllLogs() 

sendMailTest()

sendMailTest(  $smtpChecked,   $smtpServer,   $content,   $subject,   $type,   $to,   $from,   $smtpLogin,   $smtpPassword,   $smtpPort = 25,   $smtpEncryption) 

Parameters

$smtpChecked
$smtpServer
$content
$subject
$type
$to
$from
$smtpLogin
$smtpPassword
$smtpPort
$smtpEncryption

l()

l(string  $string,   $id_lang = null, \Context  $context = null) 

This method is used to get the translation for email Object.

For an object is forbidden to use htmlentities, we have to return a sentence with accents.

Parameters

string $string

raw sentence (write directly in file)

$id_lang
\Context $context

isMultibyte()

isMultibyte(  $data) 

Parameters

$data

mimeEncode()

mimeEncode(  $string,   $charset = 'UTF-8',   $newline = "\r\n") 

Parameters

$string
$charset
$newline

generateId()

generateId(  $idstring = null) 

Parameters

$idstring