Zubrag.com
August 17, 2019, 03:08:12 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Email forwarder creator - delete option?  (Read 13643 times)
jfm
Newbie
*
Posts: 3


« on: December 25, 2007, 10:01:02 PM »

I have set up the creator script on my website to create forwards and appreciate your making it available. Is there a possibility that you might someday add a delete option, so that users can delete their own forward(s)?

Thanks,
Jere

Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #1 on: December 26, 2007, 07:14:44 AM »

Hi. Will create Delete Email Forwarder in few days. Will post update here.
Logged
jfm
Newbie
*
Posts: 3


« Reply #2 on: January 16, 2008, 05:21:07 PM »

Is this still on the agenda?

Jere
Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #3 on: January 04, 1980, 04:17:13 AM »

Hi Jere.  I believe delete cpanel forwarder script is available a part of cPanel Toolbox. You can find more info and download cPanel Toolbox here.
Logged
jfm
Newbie
*
Posts: 3


« Reply #4 on: January 17, 2008, 09:39:04 AM »

Hi Jere.  I believe delete cpanel forwarder script is available a part of cPanel Toolbox. You can find more info and download cPanel Toolbox here.

I guess I'm confused. If this was already available, then why this answer:

   
Re: Email forwarder creator - delete option?
Reply #1 on: December 26, 2007, 03:14:44 pm
   Reply with quoteQuote
Hi. Will create Delete Email Forwarder in few days. Will post update here.

And looking at the contents of the zip file I don't see anything appearing to be related to forwarders - either to create or delete. What am I missing?

Jere
Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #5 on: January 18, 2008, 07:15:50 AM »

Hi. You are correct. Sorry. I guess it is lack of time.

<?php

###############################################################
# Delete Email Forwarder on cPanel
###############################################################

// cpanel user (the one you login to cpanel)
define('CPANELUSER','cpanel-username-here');

// cpanel password (the one you login to cpanel)
define('CPANELPASS','cpanel-password-here');

// your cpanel domain (localhost, or domain name)
define('CPANELDOMAIN','localhost');

// cPanel skin (usually "x")
// Check http://www.zubrag.com/articles/determine-cpanel-skin.php to know it for sure
define('CPANEL_SKIN','x');

////////////////////////////////////////////////////////////////
/////////////////////// END OF SETTINGS ////////////////////////
////////////////////////////////////////////////////////////////

function getVar($name, $def = '') {
  if (isset($_REQUEST[$name]) && ($_REQUEST[$name] != ''))
    return $_REQUEST[$name];
  else
    return $def;
}

$cpuser = CPANELUSER;
$cppass = CPANELPASS;
$cpdomain = CPANELDOMAIN;
$cpskin = CPANEL_SKIN;

$email=getVar('email');
$eforward=getVar('eforward');

if (empty($email) || empty($eforward)) {
  echo "<h1>Delete Email Forwarder on cPanel</h1>";
  echo "All fields are required.<br>
<form method='post'>
  Email:<input name='email' value='$email'> (sample: john@mydomain.com)<br>
  Forward: <input name='eforward' value='$eforward'> (sample: jimm@site2.com)<br>
  <input type='submit' value='Delete forwarder' style='border:1px solid black'>
</form>";
  die();
}

// Delete email forwarder
$f = @fopen
("http://$cpuser:$cppass@$cpdomain:2082/frontend/$cpskin/mail/dodelfwd.html?email=$email=$eforward",
 "r");
if (!$f) {
  die('Cannot delete forwarder.');
}

@fclose($f);

echo "Email Forwarder deleted: $email =&gt; $eforward";

?>
Logged
Wae
Newbie
*
Posts: 3


« Reply #6 on: May 26, 2010, 03:39:46 AM »

Why does this script above doesn't work? Is there an update to this?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC