Make Forwarders

williamvdh

New member
Joined
Aug 27, 2004
Messages
1
Hello coders!

Sorry for my bad english.

I want to create forwarders with a form, so that people can fil in an form with what they want before the @ and to what adress it must forward and then that direct admin the forwarder real-time make.

I don't understand the class, can you tell me how the class of API works?

I hope you understand what i mean.

Thanks,
William van den Hoorn,
The Netherlands
 
Luckily for you I needed to do the same thing :)

the form:

Code:
<form name="form1" method="post" action="code/da_create_forwarder.php">
from: <input name="forwardname" type="text">@domain.com<br>
to email: <input name="email" type="text"> (separate multiple addresses with comma)<br>
<input name="submit" type="submit" value="Add Forwarder"></form>

the creation:

PHP:
$email = $_POST['email'];
$forwardname = $_POST['forwardname'];

$Socket = new HTTPSocket;
$Socket->connect($siteurl,$siteport);
$Socket->set_login($user,$pass);
$Socket->set_method('POST');
$Socket->query('/CMD_EMAIL_FORWARDER',
array(
'domain' => 'domain.com',
'action' => 'create',
'user' => $forwardname,
'email'=>$email,
'create'=>'Create'
));
 
Back
Top