src/NGB/Bridge/Mail.php
public function send( $mailConf, $to = [], $subject, $body, $cc = [], $bcc = [], $attachments = [] ) {
		self::$mail->From = $mailConf['From'];
		self::$mail->FromName = $mailConf['FromName'];
		
		foreach ( $to as $address ) {
			//print_r( $address );
			if ( !isset($address['name']) ) $address['name'] = '';
			self::$mail->AddAddress( $address['mail'], $address['name'] );       // Name is optional = ''
		}
		
		self::$mail->AddReplyTo($mailConf['ReplyTo']['mail'], $mailConf['ReplyTo']['name']);
		
		foreach ( $cc as $address ) {
			//print_r($address);
			if ( !isset($address['name']) ) $address['name'] = '';
			self::$mail->AddCC( $address['mail'], $$address['name'] );
		}
		
		foreach ( $bcc as $address ) {
			//print_r($address);
			if ( !isset($address['name']) ) $address['name'] = '';
			self::$mail->AddBCC( $address['mail'], $address['name'] );
		}
		
// 		self::$instance->WordWrap = 50;                                 // Set word wrap to 50 characters
		foreach ( $attachments as $attachment ) {
			//print_r($attachment);
			self::$mail->AddAttachment( $attachment['file'], $attachment['name'] );
		}
		
		if ( !isset($mailConf['IsHTML']) ) $mailConf['IsHTML'] = true;
		self::$mail->IsHTML($mailConf['IsHTML']);
		
		self::$mail->Subject = $subject;
		self::$mail->Body    = $body;
		
		if ( !self::$mail->Send() ) {
			throw new \Exception();
		}
		
	}
public function send( $mailConf, $to = [], $subject, $body, $cc = [], $bcc = [], $attachments = [] ) {
		self::$mail->From = $mailConf['From'];
		self::$mail->FromName = $mailConf['FromName'];
		
		foreach ( $to as $address ) {
			//print_r( $address );
			if ( !isset($address['name']) ) $address['name'] = '';
			self::$mail->AddAddress( $address['mail'], $address['name'] );       // Name is optional = ''
		}
		
		self::$mail->AddReplyTo($mailConf['ReplyTo']['mail'], $mailConf['ReplyTo']['name']);
		
		foreach ( $cc as $address ) {
			//print_r($address);
			if ( !isset($address['name']) ) $address['name'] = '';
			self::$mail->AddCC( $address['mail'], $$address['name'] );
		}
		
		foreach ( $bcc as $address ) {
			//print_r($address);
			if ( !isset($address['name']) ) $address['name'] = '';
			self::$mail->AddBCC( $address['mail'], $address['name'] );
		}
		
// 		self::$instance->WordWrap = 50;                                 // Set word wrap to 50 characters
		foreach ( $attachments as $attachment ) {
			//print_r($attachment);
			self::$mail->AddAttachment( $attachment['file'], $attachment['name'] );
		}
		
		if ( !isset($mailConf['IsHTML']) ) $mailConf['IsHTML'] = true;
		self::$mail->IsHTML($mailConf['IsHTML']);
		
		self::$mail->Subject = $subject;
		self::$mail->Body    = $body;
		
		if ( !self::$mail->Send() ) {
			throw new \Exception();
		}
		
	}
TODO   falta refactorizarlo, los params serán un sólo array!!
@param unknown $mailConf
@param unknown $to
@param unknown $subject
@param unknown $body
@param unknown $cc
@param unknown $bcc
@param unknown $attachments
@throws \Exception