Yanick Beaulieu Posted July 27, 2020 Share Posted July 27, 2020 I am using the cPanel to create emails but I would like to create emails via an html page and connect it to my cPanel or on the server's smtp connection. To help my clients to create their email directly on a web page Link to comment Share on other sites More sharing options...
Ingolme Posted July 27, 2020 Share Posted July 27, 2020 HTML cannot send emails, but a server-side programming language can. PHP is one of the easiest to learn. You can learn how to send mail from PHP here: https://www.w3schools.com/php/func_mail_mail.asp You can learn how to gather form data from an HTML page here: https://www.w3schools.com/php/php_forms.asp Link to comment Share on other sites More sharing options...
Yanick Beaulieu Posted July 27, 2020 Author Share Posted July 27, 2020 not to send to create emails with php Link to comment Share on other sites More sharing options...
Ingolme Posted July 27, 2020 Share Posted July 27, 2020 Create email accounts? That is pretty complicated, I'm afraid I wouldn't know where to begin with that. Link to comment Share on other sites More sharing options...
Yanick Beaulieu Posted July 27, 2020 Author Share Posted July 27, 2020 I want to do like google and hotmail although I must go through a cpanel if you know i really need to know how to override cpanel for my clients Link to comment Share on other sites More sharing options...
Yanick Beaulieu Posted July 27, 2020 Author Share Posted July 27, 2020 <?php class Cpanel { static public function action($params = array()){ $cpuser = (isset($params['cpuser'])) ? $params['cpuser'] : '';//cpanel username $cppass = (isset($params['cppass'])) ? $params['cppass'] : '';//cpanel password $cpdomain = (isset($params['cpdomain'])) ? $params['cpdomain'] : '';//cpanel domain address (domain.com) $cpskin = (isset($params['cpskin'])) ? $params['cpskin'] : 'x3';//cpanel theme $emailname = (isset($params['emailname'])) ? $params['emailname'] : '';//email name before @ $emaildomain = (isset($params['emaildomain'])) ? $params['emaildomain'] : '';//email domain address (domain.com) $emailpass = (isset($params['emailpass'])) ? $params['emailpass'] : '';//email password $quota = (isset($params['quota'])) ? $params['quota'] : '250';//quote 0 for unlimited MB $action = (isset($params['action'])) ? $params['action'] : '';//action to perform switch ($action) { case 'createemail': fopen("https://$cpuser:$cppass@$cpdomain:2083/frontend/$cpskin/mail/doaddpop.html?email=$emailname&domain=$emaildomain&password=$emailpass"a=$quota", "r"); break; case 'deleteemail': fopen("https://$cpuser:$cppass@$cpdomain:2083/frontend/$cpskin/mail/realdelpop.html?email=$emailname&domain=$emaildomain", "r"); break; } } } require('cpanel.php'); Cpanel::action(array('emailname' => 'demo466', 'emailpass' => 'helllo123', 'action' => 'createemail')); Cpanel::action(array('emailname' => 'demo466', 'action' => 'deleteemail')); $params = array( 'emailname' => 'demo466', 'emailpass' => 'helllo123', 'action' => 'createemail' ) Cpanel::action($params); $params = array( 'cpuser' => 'cpanelusername', 'cppass' => 'cpanelpassword', 'cpdomain' => 'domain.com', 'cpskin' => 'x3', 'emailname' => 'demo466', 'emailpass' => 'helllo123', 'emaildomain' => 'domain.com', 'quota' => '500', 'action' => 'createemail' ) Cpanel::action($params); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now