PHPMailer\PHPMailer\PHPMailer::clearAttachments PHP Method

clearAttachments() public method

Clear all filesystem, string, and binary attachments.
public clearAttachments ( ) : void
return void
    public function clearAttachments()
    {
        $this->attachment = [];
    }

Usage Example

示例#1
0
 /**
  * Unset all file attachments from the email
  *
  * @return  JMail  Returns this object for chaining.
  *
  * @since   12.2
  */
 public function clearAttachments()
 {
     parent::clearAttachments();
     return $this;
 }