public function createMail($to, array $args) {
		$keys = array();
		$values = array();
		foreach ($args as $key => $value) {
			$keys[] = '{' . $key . '}';
			$values[] = $value;
		}
		$subject = str_replace($keys, $values, $this->subject);
		$message = str_replace($keys, $values, $this->message);
		$mail = new Mail($this->from, $subject, $message, $to);
		$mail->setType($this->type);
		foreach ($this->attachments as $path => $name) {
			$mail->addFile($path, $name);
		}
		
		return $mail;
	}
public function createMail($to, array $args) {
		$keys = array();
		$values = array();
		foreach ($args as $key => $value) {
			$keys[] = '{' . $key . '}';
			$values[] = $value;
		}
		$subject = str_replace($keys, $values, $this->subject);
		$message = str_replace($keys, $values, $this->message);
		$mail = new Mail($this->from, $subject, $message, $to);
		$mail->setType($this->type);
		foreach ($this->attachments as $path => $name) {
			$mail->addFile($path, $name);
		}
		
		return $mail;
	}
public function createMail ( $ to , array $ args ) { $ keys = array ( ) ; $ values = array ( ) ; foreach ( $ args as $ key => $ value ) { $ keys [ ] = '{' . $ key . '}' ; $ values [ ] = $ value ; } $ subject = str_replace ( $ keys , $ values , $ this -> subject ) ; $ message = str_replace ( $ keys , $ values , $ this -> message ) ; $ mail = new Mail ( $ this -> from , $ subject , $ message , $ to ) ; $ mail -> setType ( $ this -> type ) ; foreach ( $ this -> attachments as $ path => $ name ) { $ mail -> addFile ( $ path , $ name ) ; } return $ mail ; }
creates a mail object for a given sender
@param mixed $to
@param array $args
creates a mail object for a given sender