Skip to content

Instantly share code, notes, and snippets.

@mihailsitnic
Created March 28, 2016 05:10
Show Gist options
  • Save mihailsitnic/16f03fbd1f7307a9a285 to your computer and use it in GitHub Desktop.
Save mihailsitnic/16f03fbd1f7307a9a285 to your computer and use it in GitHub Desktop.
<?php
print_r($_POST);
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$message="";
$message .= " " . $_POST["Your_Name"]." ";
$message .= " " . $_POST["Debt_Problem"]." ";
$message .= " " . $_POST["Work_Phone"]." ";
$message .= " " . $_POST["Home_Phone"]." ";
$message .= " " . $_POST["Fax"]." ";
$message .= " " . $_POST["Mobile"]." ";
$message .= " " . $_POST["Email"]." ";
$message .= " " . $_POST["Debt"]." ";
$message .= " " . $_POST["Debtor_name"]." ";
$message .= " " . $_POST["Debtor_current_address"]." ";
$message .= " " . $_POST["Debt_outstanding_since:_"]." ";
$message .= " " . $_POST["venue"]." ";
$message = <<<EOF
<table style="background: #DADADA; box-shadow: 1px 0px 5px rgba(0, 0, 0, 0.6); margin: 60px 0; font-family: Arial;">
<tr style="background: #E6E6E6;">
<td style="padding: 10px 20px;">Name:</td>
<td style="padding: 10px 20px;">{$_POST['Your_Name']}</td>
</tr>
<tr style="">
<td style="padding: 10px 20px;">Problem</td>
<td style="padding: 10px 20px;">{$_POST['Debt_Problem']}</td>
</tr>
<tr style="background: #E6E6E6;">
<td style="padding: 10px 20px;">Work:</td>
<td style="padding: 10px 20px;">{$_POST['Work_Phone']}</td>
</tr>
<tr style="">
<td style="padding: 10px 20px;">Home:</td>
<td style="padding: 10px 20px;">{$_POST['Home_Phone']}</td>
</tr>
<tr style="background: #E6E6E6;">
<td style="padding: 10px 20px;">Fax:</td>
<td style="padding: 10px 20px;">{$_POST['Fax']}</td>
</tr>
<tr style="">
<td style="padding: 10px 20px;">Mobile:</td>
<td style="padding: 10px 20px;">{$_POST['Mobile']}</td>
</tr>
<tr style="background: #E6E6E6;">
<td style="padding: 10px 20px;">Email:</td>
<td style="padding: 10px 20px;">{$_POST['Email']}</td>
</tr>
<tr style="">
<td style="padding: 10px 20px;">Debt</td>
<td style="padding: 10px 20px;">{$_POST['Debt']}</td>
</tr>
<tr style="background: #E6E6E6;">
<td style="padding: 10px 20px;">Debtor's name:</td>
<td style="padding: 10px 20px;">{$_POST['Debtor_name']}</td>
</tr>
<tr style="">
<td style="padding: 10px 20px;">Debtor's current address:</td>
<td style="padding: 10px 20px;">{$_POST['Debtor_current_address']}</td>
</tr>
<tr style="background: #E6E6E6;">
<td style="padding: 10px 20px;">Debt outstanding since:</td>
<td style="padding: 10px 20px;">{$_POST['Debt_outstanding_since:_']}</td>
</tr>
<tr style="">
<td style="padding: 10px 20px;">Debt incurred for (job/services/goods):</td>
<td style="padding: 10px 20px;">{$_POST['venue']}</td>
</tr>
</table>
EOF;
mail("mihail.sitnic@gmail.com","subject",$message, $headers);
mail("mihail.sitnic@gmail.com", "subject", "message", "headers");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment