Skip to content

Commit

Permalink
+ added api for mail transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
JWaldecker committed Mar 28, 2018
1 parent c90c8bb commit a0bdf8d
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lumaserv/lumaserv-php-client",
"description": "A full-featured implementation of the LumaservSystem-JSON-API",
"type": "library",
"version": "1.7.5",
"version": "1.7.6",
"require": {
"php": ">=5.5",
"guzzlehttp/guzzle": ">=6.0"
Expand Down
15 changes: 15 additions & 0 deletions src/LUMASERV.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,4 +332,19 @@ public function virtual_servers()

return $this->virtualServerHandler;
}


private $toolHandler;

/**
* @return ToolHandler
*/
public function tools()
{
if (!$this->toolHandler) {
$this->toolHandler = new ToolHandler($this);
}

return $this->toolHandler;
}
}
34 changes: 34 additions & 0 deletions src/ToolHandler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
/**
* Created by PhpStorm.
* User: Jan Waldecker
* Date: 02.09.2016
* Time: 00:33.
*/
namespace LumaservSystems;

class ToolHandler
{
private $lumaserv;

public function __construct(LUMASERV $lumaserv)
{
$this->lumaserv = $lumaserv;
}

public function transferMails($src_host, $src_mail, $src_password, $src_port, $src_encryption, $tgt_host, $tgt_mail, $tgt_password, $tgt_port, $tgt_encryption)
{
return $this->lumaserv->post('tools/mailTransfer', [
'src_host' => $src_host,
'src_mail' => $src_mail,
'src_password' => $src_password,
'src_port' => $src_port,
'src_encryption' => $src_encryption,
'tgt_host' => $tgt_host,
'tgt_mail' => $tgt_mail,
'tgt_password' => $tgt_password,
'tgt_port' => $tgt_port,
'tgt_encryption' => $tgt_encryption,
]);
}
}

0 comments on commit a0bdf8d

Please sign in to comment.