<?

########## Confixx(R) 3.0 Professional ############
####### Copyright SWsoft, Inc. 2004-2005 ##########
#### http://www.sw-soft.com - info@sw-soft.com ####


## Konfiguration
$sender = "";              ## Ihre E-Mail-Adresse
$user   = "";              ## Ihr Benutzername
$password = "";            ## Ihr Passwort
$recipient = "";           ## Empfänger der E-Mail
$ccrecipient = "";         ## Empfänger eine Kopie (wg. Abrechnung), optional
## /Konfiguration


function sendDnr() {

	global $sender,$user,$password,$recipient,$ccrecipient;

	global $dnr_c_firstname,$dnr_c_gender,$dnr_c_plz,$dnr_c_land,$dnr_c_name,$dnr_c_firma,
		$dnr_c_anschrift,$dnr_c_ort,$dnr_c_telefon,$dnr_c_telefax,$dnr_c_emailadresse,
		$dnr_d_domain,$dnr_d_pns,$dnr_d_sns;

	global $dnr_a_firstname,$dnr_a_gender,$dnr_a_plz,$dnr_a_land,$dnr_a_name,$dnr_a_firma,
		$dnr_a_anschrift,$dnr_a_ort,$dnr_a_telefon,$dnr_a_telefax,$dnr_a_emailadresse;



## Betreff setzen
	$subject  = "REG: ".$dnr_d_domain;
## Betreff setzen

## name-vorname , plz-ort bestimmen

	$dnr_c_lastname = $dnr_c_name;
	$dnr_c_pcode = $dnr_c_plz;
	$dnr_c_city = $dnr_c_ort;

	$dnr_a_lastname = $dnr_a_name;
	$dnr_a_pcode = $dnr_a_plz;
	$dnr_a_city  = $dnr_a_ort;
## name-vorname , plz-ort bestimmen

## mailbody zusammensetzen
	$mailbody = $mailbody."X-User: ".$user."\n";
	$mailbody = $mailbody."X-Pass: ".$password."\n\n";
	$mailbody = $mailbody."version:          1.0\n";
	$mailbody = $mailbody."language:         de\n\n";
	$mailbody = $mailbody."domain:           ".$dnr_d_domain."\n\n";
	$mailbody = $mailbody."# Domaineigner/Registrant\n\n";
	$mailbody = $mailbody."regc_sex:         ".$dnr_c_gender."\n";
	$mailbody = $mailbody."regc_firstname:   ".$dnr_c_firstname."\n";
	$mailbody = $mailbody."regc_lastname:    ".$dnr_c_lastname."\n";
	$mailbody = $mailbody."regc_org:         ".$dnr_c_firma."\n";
	$mailbody = $mailbody."regc_street:      ".$dnr_c_anschrift."\n";
	$mailbody = $mailbody."regc_pcode:       ".$dnr_c_pcode."\n";
	$mailbody = $mailbody."regc_city:        ".$dnr_c_city."\n";
	$mailbody = $mailbody."regc_phone:       ".$dnr_c_telefon."\n";
	$mailbody = $mailbody."regc_fax:         ".$dnr_c_telefax."\n";
	$mailbody = $mailbody."regc_email:       ".$dnr_c_emailadresse."\n";
	$mailbody = $mailbody."regc_ccode:       ".$dnr_c_land."\n\n";
	$mailbody = $mailbody."# Admin-Contact\n";
	$mailbody = $mailbody."adminc_sex:       ".$dnr_c_gender."\n";
	$mailbody = $mailbody."adminc_firstname: ".$dnr_c_firstname."\n";
	$mailbody = $mailbody."adminc_lastname:  ".$dnr_c_lastname."\n";
	$mailbody = $mailbody."adminc_org:       ".$dnr_c_firma."\n";
	$mailbody = $mailbody."adminc_street:    ".$dnr_c_anschrift."\n";
	$mailbody = $mailbody."adminc_pcode:     ".$dnr_c_pcode."\n";
	$mailbody = $mailbody."adminc_city:      ".$dnr_c_city."\n";
	$mailbody = $mailbody."adminc_phone:     ".$dnr_c_telefon."\n";
	$mailbody = $mailbody."adminc_fax:       ".$dnr_c_telefax."\n";
	$mailbody = $mailbody."adminc_email:     ".$dnr_c_emailadresse."\n";
	$mailbody = $mailbody."adminc_ccode:     ".$dnr_c_land."\n\n";
	$mailbody = $mailbody."# Technical-Contact\n";
	$mailbody = $mailbody."techc_sex:        ".$dnr_a_gender."\n";
	$mailbody = $mailbody."techc_firstname:  ".$dnr_a_firstname."\n";
	$mailbody = $mailbody."techc_lastname:   ".$dnr_a_lastname."\n";
	$mailbody = $mailbody."techc_org:        ".$dnr_a_firma."\n";
	$mailbody = $mailbody."techc_street:     ".$dnr_a_anschrift."\n";
	$mailbody = $mailbody."techc_pcode:      ".$dnr_a_pcode."\n";
	$mailbody = $mailbody."techc_city:       ".$dnr_a_city."\n";
	$mailbody = $mailbody."techc_phone:      ".$dnr_a_telefon."\n";
	$mailbody = $mailbody."techc_fax:        ".$dnr_a_telefax."\n";
	$mailbody = $mailbody."techc_email:      ".$dnr_a_emailadresse."\n";
	$mailbody = $mailbody."techc_ccode:      ".$dnr_a_land."\n\n";
	$mailbody = $mailbody."# Zone-Contact\n";
	$mailbody = $mailbody."zonec_sex:        ".$dnr_a_gender."\n";
	$mailbody = $mailbody."zonec_firstname:  ".$dnr_a_firstname."\n";
	$mailbody = $mailbody."zonec_lastname:   ".$dnr_a_lastname."\n";
	$mailbody = $mailbody."zonec_org:        ".$dnr_a_firma."\n";
	$mailbody = $mailbody."zonec_street:     ".$dnr_a_anschrift."\n";
	$mailbody = $mailbody."zonec_pcode:      ".$dnr_a_pcode."\n";
	$mailbody = $mailbody."zonec_city:       ".$dnr_a_city."\n";
	$mailbody = $mailbody."zonec_phone:      ".$dnr_a_telefon."\n";
	$mailbody = $mailbody."zonec_fax:        ".$dnr_a_telefax."\n";
	$mailbody = $mailbody."zonec_email:      ".$dnr_a_emailadresse."\n";
	$mailbody = $mailbody."zonec_ccode:      ".$dnr_a_land."\n\n";
 ## /mailbody zusammensetzen

## dns
	$mailbody = $mailbody."# DNS-Konfiguration\n";
	$mailbody = $mailbody."ns1_name:         ".$dnr_d_pns."\n";
	if($pnsdom == $dnr_d_domain){
		$id       = db_query("select ip_pns from admin");
		$werte    = db_fetch_array($id);
		$ip_pns   =  $werte["ip_pns"];
		$mailbody = $mailbody."ns1_ip:           ".$ip_pns."\n";
	}
	$mailbody = $mailbody."ns2_name:         ".$dnr_d_sns."\n"; 
	if($snsdom == $dnr_d_domain){
		$id       = db_query("select ip_sns from admin");
		$werte    = db_fetch_array($id);
		$ip_sns   =  $werte["ip_sns"];
		$mailbody = $mailbody."ns2_ip:           ".$ip_sns."\n";
	}
## /dns


## mail versenden
	if ( $DEBUG ) {
		echo "to: $recipient<br>\nsubject: $subject<br>\nbody: $mailbody<br>\n";
	}

	if ( !mail( $recipient,$subject,$mailbody,"From: $sender") ){
		if ( $DEBUG ) {
			echo "error: mail is not send<br>\n";
		}
	}
	if($ccrecipient != ""){
		mail($ccrecipient,$subject,$mailbody,"From: $sender");
	}
## /mail versenden
}
?>
