Ok, let's try this out:
$db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . "
(coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent)
values ('" . $insert_id ."', '0', 'Admin',
'" . $mail->fields['customers_email_address'] . "', now() )");
change to:
Code:
$db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . "
(coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent)
values ('" . $insert_id ."', '0', '".$from."',
'" . $mail->fields['customers_email_address'] . "', now() )");
After applying these modifications, it should show the current admin's email as result. 
Then, lower, change this block:
$insert_query = $db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . "
(coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent)
values ('" . $insert_id ."', '0', 'Admin',
'" . $_POST['email_to'] . "', now() )");
to read:
Code:
$insert_query = $db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . "
(coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent)
values ('" . $insert_id ."', '0', '".$from."',
'" . $_POST['email_to'] . "', now() )");
Note: Backup your file first.
Bookmarks