Code: Select all
<?php
include 'all.php';
$email = $_POST["email"];
$from = $_POST["email"];
$tos = $_POST["tos"];
$subject = "Order From Website";
$to = "XXXXXX";
$message = "
$Salutation $First_Name $Last_Name has placed an order for $package for the site $Domain
$First_Name $Last_Name has chosen to pay by $payment and has chosen to pay $currency $amount per $duration
The invoice number is $orderno
Contact Details
$Company
$Address1
$Address2
$City
$Zip
$State
$Country
Telephone: $Tel_Country - $Tel_Area - $Tel_No
Fax: $Fax_Country - $Fax_Area - $Fax_No
Whether agreed to Terms and Condition: $tos
-----------------------------------------
His IP Address was $IP
-----------------------------------------
";
mail($to, $subject, $message, "From: $First_Name $Last_Name <$email>");
?>Code: Select all
<?php
require_once "Mail.php";
$from = "name Sender <mail@domain.com>";
$to = "name Recipient <mail@domain.com>";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$host = "XXXXXX";
$username = "XXXX";
$password = "XXXX";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>
The chap who had done my site is not traceable. Can somebody help me merge both these codes?