Want to send email from ipn to 'payer_email'
My ipn works and paypal sends the data and is inserted into my database. i want the ipn to automatically send a thankyou email to the payer_email.
My code
<?php
if (true) { //WA Universal Email
$Email = new WA_Email("ipn_2");
$Email->From = "example@example.org";
$Email->addTo("payer_email");
$Email->addBCC("myemail@gmail.com");
$Email->BodyFile = "webassist/email/templates/WebAssist-Block/Block_2.php";
if (function_exists("rel2abs") && $Email->Redirect) $Email->Redirect = $Email->Redirect?rel2abs($Email->Redirect,dirname(__FILE__)):"";
for ($emailGroup=0; $emailGroup<sizeof($Email->To); $emailGroup++) {
$Email->Subject = "Thank you for your recent donation to Kappa Sigma House Fund";
$Email->send($emailGroup);
}
$Email->close();
}
?>
I don't know if putting "payer_email" in the $Email->addTo is correct? Should it be $_Post[‘payer_email’] or $_GET[‘payer_email’] or something else?