PHPMailer\PHPMailer\PHPMailer::attachmentExists PHP Method

attachmentExists() public method

Check if an attachment (non-inline) is present.
public attachmentExists ( ) : boolean
return boolean
    public function attachmentExists()
    {
        foreach ($this->attachment as $attachment) {
            if ($attachment[6] == 'attachment') {
                return true;
            }
        }
        return false;
    }