public function attachData($data, $options=[]) {
		$attachment = \Swift_Attachment::newInstance($data);
		if(isset($options['filename']))
			$attachment->setFilename($options['filename']);
		if(isset($options['mime']))
			$attachment->setContentType($options['mime']);
		return $this->attach($attachment);
	}
public function attachData($data, $options=[]) {
		$attachment = \Swift_Attachment::newInstance($data);
		if(isset($options['filename']))
			$attachment->setFilename($options['filename']);
		if(isset($options['mime']))
			$attachment->setContentType($options['mime']);
		return $this->attach($attachment);
	}
public function attachData ( $ data , $ options = [ ] ) { $ attachment = \ Swift_Attachment :: newInstance ( $ data ) ; if ( isset ( $ options [ 'filename' ] ) ) $ attachment -> setFilename ( $ options [ 'filename' ] ) ; if ( isset ( $ options [ 'mime' ] ) ) $ attachment -> setContentType ( $ options [ 'mime' ] ) ; return $ this -> attach ( $ attachment ) ; }
Attach data as a file to the email.
@param  string $data
@param  array  $options
@return SwiftMessage $this
Attach data as a file to the email .