• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue My Mail API Script is not working for creating mail accounts.

I had working script written in PHP to create email account in plesk. I got that from
pmill/php-plesk

Script is below.
<?php

require_once("config.php");
//echo $_GET['r']."<br>";
$emilid=$_GET['email'];
$password=$_GET['password'];

$params = array(
'email'=>$emilid,
'password'=>$password,
);

$request = new \pmill\Plesk\CreateEmailAddress($config, $params);
$info = $request->process();

Now. This script does not work after my plesk was update to Version 17.8.11.

My Server details are
OS ‪CentOS Linux 7.5.1804 (Core)‬
Product Plesk Onyx
Version 17.8.11 Update #22, last updated on Sept 26, 2018 03:25 AM


Please help me how to fix this.
 
mod_fcgid: stderr: PHP Fatal error: Uncaught exception 'pmill\\Plesk\\ApiRequestException' with message 'Error: Incorrect request parameters submitted' in /var/www/vhosts/../plesk/src/pmill/Plesk/BaseRequest.php:31, referer: https://../system-emailgateway-vcm-emails-new.php?id=88

mod_fcgid: stderr: Stack trace:, referer: https://../system-emailgateway-vcm-emails-new.php?id=88

mod_fcgid: stderr: #0 /var/www/vhosts/../plesk/src/pmill/Plesk/ListEmailAddresses.php(33): pmill\\Plesk\\BaseRequest->__construct(Array, Array), referer: https://../system-emailgateway-vcm-emails-new.php?id=88

mod_fcgid: stderr: #1 /var/www/vhosts/../plesk/examples/EmailAddresses/checkemail.php(8): pmill\\Plesk\\ListEmailAddresses->__construct(Array, Array), referer: https://../system-emailgateway-vcm-emails-new.php?id=88

mod_fcgid: stderr: #2 {main}, referer: https://../system-emailgateway-vcm-emails-new.php?id=88

mod_fcgid: stderr: thrown in /var/www/vhosts/../plesk/src/pmill/Plesk/BaseRequest.php on line 31, referer: https://../system-emailgateway-vcm-emails-new.php?id=88
 
What Plesk version did you update from? Just curious as this github project hasn't been updated in a few years by the looks of it.
 
Line 31 is
if (!$this->check_params()) {
throw new ApiRequestException("Error: Incorrect request parameters submitted");
}

I commented the line as
//throw new ApiRequestException("Error: Incorrect request parameters submitted");

Now
This error comes.

mod_fcgid: stderr: PHP Fatal error: Uncaught exception 'pmill\\Plesk\\ApiRequestException' with message 'This feature is not supported for protocol version 1.6.3.5.' in /var/www/vhosts/../plesk/src/pmill/Plesk/CreateEmailAddress.php:60, referer: https://../system-emailgateway-vcm-emails-new.php?id=88

My Latest version is
Plesk Onyx
Version 17.8.11 Update #24, last updated on Oct 4, 2018 03:10 AM

It's just automate update. It comes and I says update.
 
Can't I change the version of API. It's not my fault, it's automated update.

If I cannot change the version, can you give me code samples. this documentation does not have a sample. It seems complex.
 
To confirm, you’re just looking for a quick example in PHP to make a proper API called to Plesk to create an email account?

I can get you something in a day or two if nobody beats me to it. I’m just too busy with other clients lately. I also haven’t worked with the Plesk API lately so I’m thinking my current examples wouldn’t function either.
 
Back
Top