CaMykS  1.0-20231201
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
CMail Class Reference

E-mail generic object. More...

Public Member Functions

 __construct ()
 
 initialise ()
 
 set_mimeVersion ($mime)
 
 set_contentType ($type)
 
 set_returnPath ($email)
 
 add_header ($name, $value)
 
 set_sender ($email, $name='')
 
 add_replyTo ($email, $name='')
 
 add_recipient ($email, $name='')
 
 add_ccRecipient ($email, $name='')
 
 add_bccRecipient ($email, $name='')
 
 set_subject ($subject)
 
 set_textBody ($content)
 
 set_HTMLBody ($content)
 
 build_HTMLBody ($content, $cssPath=false)
 
 add_attachment ($file)
 
 attach_file ($file)
 
 add_attachments ($files)
 
 attach_files ($files)
 
 add_embeddedImage ($img)
 
 embed_image ($img)
 
 add_embeddedImages ($imgs)
 
 embed_images ($imgs)
 
 send ()
 
 get_lastError ()
 
 get_contactListAsString ($list='To', $container='<', $separator=', ')
 

Public Attributes

 $params = array()
 Parameters list. More...
 

Private Member Functions

 _send_PEARMimeMail ()
 
 _send_PHPMailerMail ()
 
 _check_stringEncoding ($string)
 

Private Attributes

 $error = ''
 Last error. More...
 

Detailed Description

E-mail generic object.

Engine / Object Library

Author
CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Version
1.0.1.1
Date
Creation: Jun 2012
Modification: Oct 2021
Note
This program is distributed as is - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. CMail class.
Author
CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Constructor & Destructor Documentation

◆ __construct()

CMail::__construct ( )

Class constructor.

Returns
void

Member Function Documentation

◆ initialise()

CMail::initialise ( )

Initialise object.

Returns
void

◆ set_mimeVersion()

CMail::set_mimeVersion (   $mime)

Set mime version.

Parameters
string$mime
Returns
void

◆ set_contentType()

CMail::set_contentType (   $type)

Set content type.

Parameters
string$type
Returns
void

◆ set_returnPath()

CMail::set_returnPath (   $email)

Set return path.

Parameters
string$email
Returns
void

◆ add_header()

CMail::add_header (   $name,
  $value 
)

Add suppl. header.

Parameters
string$name
string$value
Returns
void

◆ set_sender()

CMail::set_sender (   $email,
  $name = '' 
)

Set sender.

Parameters
string$email
string$name
Returns
void

◆ add_replyTo()

CMail::add_replyTo (   $email,
  $name = '' 
)

Add reply-to.

Parameters
string$email
string$name
Returns
void

◆ add_recipient()

CMail::add_recipient (   $email,
  $name = '' 
)

Add normal recipient.

Parameters
string$email
string$name
Returns
void

◆ add_ccRecipient()

CMail::add_ccRecipient (   $email,
  $name = '' 
)

Add Cc recipient.

Parameters
string$email
string$name
Returns
void

◆ add_bccRecipient()

CMail::add_bccRecipient (   $email,
  $name = '' 
)

Add Bcc recipient.

Parameters
string$email
string$name
Returns
void

◆ set_subject()

CMail::set_subject (   $subject)

Set subject value.

Parameters
string$subject
Returns
void

◆ set_textBody()

CMail::set_textBody (   $content)

Set text body.

Parameters
string$content
Returns
void

◆ set_HTMLBody()

CMail::set_HTMLBody (   $content)

Set HTML body.

Parameters
string$content
Returns
void

◆ build_HTMLBody()

CMail::build_HTMLBody (   $content,
  $cssPath = false 
)

Build HTML body.

Parameters
string$content
string$cssPath
Returns
void

◆ add_attachment()

CMail::add_attachment (   $file)

Add an attached file.

Parameters
string$file
Returns
void

◆ attach_file()

CMail::attach_file (   $file)

Alias to add_attachment.

See also
add_attachment()
Parameters
string$file
Returns
void

◆ add_attachments()

CMail::add_attachments (   $files)

Add attached files.

Parameters
array$files
Returns
void

◆ attach_files()

CMail::attach_files (   $files)

Alias to add_attachments.

See also
add_attachments()
Parameters
array$files
Returns
void

◆ add_embeddedImage()

CMail::add_embeddedImage (   $img)

Add an embed image.

Parameters
string$img
Returns
void

◆ embed_image()

CMail::embed_image (   $img)

Alias to add_embeddedImage.

See also
add_embeddedImage()
Parameters
string$img
Returns
void

◆ add_embeddedImages()

CMail::add_embeddedImages (   $imgs)

Add embedded images.

Parameters
array$imgs
Returns
void

◆ embed_images()

CMail::embed_images (   $imgs)

Alias to add_embeddedImages.

See also
add_embeddedImages()
Parameters
array$imgs
Returns
void

◆ send()

CMail::send ( )

Send email.

Returns
boolean success

◆ get_lastError()

CMail::get_lastError ( )

Return last error.

Returns
string

◆ get_contactListAsString()

CMail::get_contactListAsString (   $list = 'To',
  $container = '<',
  $separator = ',
 
)

Return contact list as string

Parameters
string$list
string$container
string$separator
Returns
string

◆ _send_PEARMimeMail()

CMail::_send_PEARMimeMail ( )
private

send email using PEAR Mime Mail library

Returns
boolean success

◆ _send_PHPMailerMail()

CMail::_send_PHPMailerMail ( )
private

send email using PHPMailler library

Returns
boolean success

◆ _check_stringEncoding()

CMail::_check_stringEncoding (   $string)
private

Check text encoding.

Parameters
string$string
Returns
string

Member Data Documentation

◆ $params

array CMail::$params = array()

Parameters list.

◆ $error

string CMail::$error = ''
private

Last error.


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