public AddStringAttachment ( string $string, string $filename, string $encoding = 'base64', string $type = 'application/octet-stream' ) : void | ||
$string | string | String attachment data. |
$filename | string | Name of the attachment. |
$encoding | string | File encoding (see $Encoding). |
$type | string | File extension (MIME) type. |
return | void |
public function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octet-stream')
{
/* Append to $attachment array */
$cur = count($this->attachment);
$this->attachment[$cur][0] = $string;
$this->attachment[$cur][1] = $filename;
$this->attachment[$cur][2] = $filename;
$this->attachment[$cur][3] = $encoding;
$this->attachment[$cur][4] = $type;
$this->attachment[$cur][5] = true;
// isString
$this->attachment[$cur][6] = 'attachment';
$this->attachment[$cur][7] = 0;
}