From: Anthony Talarico Date: Wed, 11 Nov 2015 20:35:18 +0000 (-0500) Subject: Used php mail function instead of wp_mail wrapper. Tested working on localhost X-Git-Tag: v1.0.1^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=601fb560314ef7fe439804e2c9943a845329b09f;p=WP-Plugins%2FGlmPayments.git Used php mail function instead of wp_mail wrapper. Tested working on localhost --- diff --git a/includes/payment-display.php b/includes/payment-display.php index fc32aeb..3025541 100755 --- a/includes/payment-display.php +++ b/includes/payment-display.php @@ -64,16 +64,26 @@ $post = get_post($post->ID); $slug = $post->post_name; - wp_mail( 'laury@localhost', 'test1a', 'pass'); - paymentemail($first_name,$last_name,$organisation,$donation_type,$amount,$invoice_num,$comment); - wp_mail( 'laury@localhost', 'test1b', 'pass'); + // verification form submission to billing@gaslightmedia.com ////// + $headers = "From: Gaslight Media \r\n" . + "Reply-To: noreply@gaslightmedia.com\r\n"; + + $clientInfo = "A payment has been made on the Gaslight Media website. Please review the billing information below\r\n" . + "First Name: " . $first_name . "\r\n" . + "Last Name: " . $last_name . "\r\n" . + "Invoice #: " . $invoice_num . "\r\n" . + "Payment Amount: $". $amount . "\r\n" . + "Organization: " . $organization; + $message = print_r($clientInfo, true); + mail( 'anthony@localhost', 'GLM Payment Form', $message, $headers); + header("Location:".site_url().$_SERVER['REQUEST_URI']); exit; } else { - wp_mail( 'laury@localhost', 'test1c', 'pass'); + // wp_mail( 'anthony@localhost', 'test1c', 'pass'); header("Location:".site_url().$_SERVER['REQUEST_URI']); exit; } diff --git a/includes/payment-function.php b/includes/payment-function.php index 1721d23..198df3e 100755 --- a/includes/payment-function.php +++ b/includes/payment-function.php @@ -288,21 +288,19 @@ function checkCreditCard($cardnumber, $cardname, &$errornumber, &$errortext) { return true; } -function paymentemail($first_name = 'fname',$last_name ='lname',$organisation = 'orgname', - $donation_type = 'dontype',$amount = 'amount',$invoice_num = 'invnum',$comment = 'comment') { +/*function paymentemail($first_name,$last_name,$organization,$amount,$invoice_num) { // paymentemail($first_name,$last_name,$organisation,$donation_type,$amount,$invoice_num,$comment); - $to = "laury@localhost"; - $subject = 'wp_mail function test 2'; + $to = "anthony@localhost"; + $subject = 'GLM Payment Form'; // $message = 'This is a test of the wp_mail function: wp_mail is working'; $message = 'A payment has been made on the Gaslight Media website. Please review the billing information below' . - '
Name: ' . $last_name . ', ' . $first_name . '
Organisation: ' . $organisation . '
Donation Type: ' . - $donation_type . '
Amount: ' . $amount . '
Invoice Number: ' . $invoice_num . '
Comments: ' . $comment; + '
Name: ' . $last_name . ', ' . $first_name . '
Organisation: ' . $organization . '
Amount: ' . $amount . '
Invoice Number: ' . $invoice_num; $headers = array(); - $headers[] = 'From: Gaslight Media '; + $headers[] = 'From: Gaslight Media '; $headers[] = 'Reply-To: noreply@gaslightmedia.com'; $headers[] = 'Content-Type: text/html'; $headers[] = 'charset=utf-8'; - $sent_message = wp_mail( $to, $subject, $message, $headers ); -} + mail( $to, $subject, $message, $headers ); +} */ ?> diff --git a/includes/payment-options.php b/includes/payment-options.php index edefa33..1cac0dc 100755 --- a/includes/payment-options.php +++ b/includes/payment-options.php @@ -132,13 +132,13 @@ function glm_payment_options_page() // $amount = 'amt'; // $invoice_num = 'invnum'; // $comment = 'comment'; -// $to = "laury@localhost"; +// $to = "anthony@localhost"; // $subject = 'wp_mail function test'; // $message = 'A payment has been made on the Gaslight Media website. Please review the billing information below' . // '
Name: ' . $last_name . ', ' . $first_name . '
Organisation: ' . $organisation . '
Donation Type: ' . // $donation_type . '
Amount: ' . $amount . '
Invoice Number: ' . $invoice_num . '
Comments: ' . $comment; // $headers = array(); -// $headers[] = 'From: Gaslight Media '; +// $headers[] = 'From: Gaslight Media '; // $headers[] = 'Reply-To: noreply@gaslightmedia.com'; // $headers[] = 'Content-Type: text/html'; // $headers[] = 'charset=utf-8';