noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
Noalyss\SMTPMail Class Reference
+ Collaboration diagram for Noalyss\SMTPMail:

Public Member Functions

 __construct (Mail_Parameter $mail_parameter)
 
 __toString ()
 
 add_file (\FileToSend $filename)
 
 add_supplemental_header ()
 
 compose ()
 
 getPhpmailer ()
 
 mailto ($email)
 
 send ()
 
 set_format ($format)
 
 set_from ($from)
 
 set_message ($msg)
 
 set_subject ($subject)
 
 setBlindCopy ($blind_copy)
 
 setPhpmailer ($phpmailer)
 
 setReplyTo ($reply_to)
 

Protected Attributes

 $phpmailer
 

Detailed Description

Definition at line 35 of file smtpmail.class.php.

Constructor & Destructor Documentation

◆ __construct()

Noalyss\SMTPMail::__construct ( Mail_Parameter $mail_parameter)
Parameters
$reply_to
$blind_copy

Definition at line 44 of file smtpmail.class.php.

45 {
46 $this->phpmailer = new PHPMailer;
47 $this->phpmailer->CharSet = PHPMailer::CHARSET_UTF8;
48
49 //$this->phpmailer->SMTPDebug = SMTP::DEBUG_CONNECTION;
50 $this->phpmailer->SMTPDebug = SMTP::DEBUG_OFF;
51 $this->phpmailer->isSMTP(true);
52 $this->phpmailer->XMailer = "noalyss-email";
53 $this->phpmailer->Host = $mail_parameter->smtp_host;
54 $this->phpmailer->Port = $mail_parameter->smtp_port;
55 $this->phpmailer->Username = $mail_parameter->smtp_user;
56 $this->phpmailer->Password = $mail_parameter->smtp_password;
57 $this->phpmailer->SMTPAuth = ($mail_parameter->smtp_auth == 1) ? true : false;
58 $this->phpmailer->SMTPSecure = $mail_parameter->smtp_secure;
59 $this->phpmailer->setFrom($mail_parameter->smtp_from);
60 $this->phpmailer->SMTPSecure = $mail_parameter->smtp_secure;
61 $this->phpmailer->setFrom($mail_parameter->smtp_from);
62 // $this->phpmailer->addReplyTo($mail_parameter->smtp_replyto);
63 // $this->blind_copy = $blind_copy;
64 $this->phpmailer->isHTML(true);
65 }

Member Function Documentation

◆ __toString()

Noalyss\SMTPMail::__toString ( )

Definition at line 115 of file smtpmail.class.php.

116 {
117
118 }

◆ add_file()

Noalyss\SMTPMail::add_file ( \FileToSend $filename)

Definition at line 143 of file smtpmail.class.php.

143 : SMTPMail
144 {
145 $this->phpmailer->addAttachment($filename->full_name);
146 return $this;
147 }

◆ add_supplemental_header()

Noalyss\SMTPMail::add_supplemental_header ( )

Definition at line 110 of file smtpmail.class.php.

111 {
112
113 }

◆ compose()

Noalyss\SMTPMail::compose ( )

Definition at line 149 of file smtpmail.class.php.

149 : SMTPMail
150 {
151 $this->phpmailer->preSend();
152 return $this;
153 }

◆ getPhpmailer()

Noalyss\SMTPMail::getPhpmailer ( )

Definition at line 67 of file smtpmail.class.php.

68 {
69 return $this->phpmailer;
70 }

◆ mailto()

Noalyss\SMTPMail::mailto ( $email)

Definition at line 120 of file smtpmail.class.php.

120 : SMTPMail
121 {
122 $a_email = explode(',', $email);
123 foreach ($a_email as $item)
124 {
125 $this->phpmailer->addAddress($item);
126 }
127 return $this;
128 }

◆ send()

Noalyss\SMTPMail::send ( )

Definition at line 155 of file smtpmail.class.php.

155 : SMTPMail
156 {
157 $this->phpmailer->send();
158 return $this;
159 }

References send().

Referenced by send().

+ Here is the call graph for this function:

◆ set_format()

Noalyss\SMTPMail::set_format ( $format)

Definition at line 81 of file smtpmail.class.php.

81 : SMTPMail
82 {
83 if (strtolower($format) == 'html')
84 {
85 $this->phpmailer->isHTML(true);
86 return $this;
87 }
88 $this->phpmailer->isHTML(false);
89 return $this;
90 }

◆ set_from()

Noalyss\SMTPMail::set_from ( $from)

Definition at line 71 of file smtpmail.class.php.

72 {
73 $this->phpmailer->setFrom($from);
74 }
$from

References $from.

◆ set_message()

Noalyss\SMTPMail::set_message ( $msg)

Definition at line 136 of file smtpmail.class.php.

136 : SMTPMail
137 {
138 $this->phpmailer->Body = $msg;
139 $this->phpmailer->AltBody = \strip_tags($msg);
140 return $this;
141 }

References $msg.

◆ set_subject()

Noalyss\SMTPMail::set_subject ( $subject)

Definition at line 130 of file smtpmail.class.php.

130 : SMTPMail
131 {
132 $this->phpmailer->Subject = $subject;
133 return $this;
134 }

◆ setBlindCopy()

Noalyss\SMTPMail::setBlindCopy ( $blind_copy)
Parameters
mixed$blind_copy

Definition at line 95 of file smtpmail.class.php.

95 : SMTPMail
96 {
97 $this->phpmailer->addBCC($this->blind_copy);
98 return $this;
99 }

◆ setPhpmailer()

Noalyss\SMTPMail::setPhpmailer ( $phpmailer)

Definition at line 75 of file smtpmail.class.php.

75 : PHPMailer
76 {
77 $this->phpmailer = $phpmailer;
78 return $this;
79 }

References $phpmailer.

◆ setReplyTo()

Noalyss\SMTPMail::setReplyTo ( $reply_to)
Parameters
mixed$reply_to

Definition at line 104 of file smtpmail.class.php.

104 : SMTPMail
105 {
106 $this->phpmailer->addReplyTo($reply_to);
107 return $this;
108 }

Field Documentation

◆ $phpmailer

Noalyss\SMTPMail::$phpmailer
protected

Definition at line 38 of file smtpmail.class.php.

Referenced by setPhpmailer().


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