Definition at line 80 of file email_manager.inc.
◆ __construct()
SMTPEmailTransport::__construct |
( |
| ) |
|
◆ send()
SMTPEmailTransport::send |
( |
| ) |
|
Reimplemented from AbstractEmailTransport.
Definition at line 86 of file email_manager.inc.
91 $replyTo = $this->replyTo ?
"{$this->replyName} <{$this->replyTo}>" :
"{$this->emailName} <{$this->emailFrom}>";
93 $from = $this->emailName .
" <" . $this->emailFrom .
">";
96 $headers .=
"Reply-To: ".
$replyTo .
"\r\n";
97 $headers .=
"MIME-Version: 1.0\r\n";
99 $random_hash = md5(date(
'r', time()));
101 $headers .=
"Content-Type: multipart/alternative; boundary=\"--PHP-alt-".$random_hash.
"\"\r\n";
105 if (!$this->plainMessage) $this->plainMessage = HTMLToText($this->htmlMessage);
108 ----PHP-alt-{$random_hash}
109 Content-Type: text/plain
110 Content-Disposition:
inline
111 Content-Transfer-Encoding: 8bit
113 {$this->plainMessage}
116 ----PHP-alt-{$random_hash}
117 Content-Type: text/html
118 Content-Disposition:
inline
119 Content-Transfer-Encoding: 8bit
126 $message .=
"----PHP-alt-{$random_hash}\r\n";
133 ----PHP-alt-{$random_hash}
134 Content-Type: text/calendar; charset=utf-8;method={$this->icalMethod}
135 Content-Disposition:
inline;
filename=meeting.ics
136 Content-Transfer-Encoding: 8bit
141 trace(
"Sending Mail from {$from} to {$this->to}: {$this->subject}", 3);
144 $rtn = $this->mail->send();
if(! $attachment_id) $attachment
writeAttachment($filename, $attachment)
static getValue($component, $name)
Retrieve the value of the specified Setting.
if(!Settings::getValue("debug", "enable_trace_file_downloads")) $filename
◆ writeAttachment()
SMTPEmailTransport::writeAttachment |
( |
|
$filename, |
|
|
|
$attachment |
|
) |
| |
Definition at line 149 of file email_manager.inc.
151 $fileAttachments =
"";
156 $fileAttachments .=
"----PHP-alt-{$random_hash}\n";
158 $fileContents = @fread($fp, filesize(
$attachment));
160 $fileContents = chunk_split(base64_encode($fileContents));
161 $fileAttachments .=
"Content-Type: application/octet-stream; name=\"". $base_filename .
"\"\n" .
162 "Content-Description: ".$base_filename.
"\n" .
163 "Content-Disposition: attachment;\n" .
" filename=\"". $base_filename .
"\"; size=".filesize(
$attachment).
";\n" .
164 "Content-Transfer-Encoding: base64\n\n" . $fileContents .
"\n\n";
167 return $fileAttachments;
The documentation for this class was generated from the following file: