Hi there,
In the payment method "Bank Transfer", I hope it will also send an email to remind the customer about the account info.
Thus, I go to "banktransfer_end.php" but have no idea how and where should I insert some codes in order to send an email to the customer.
I found out joomla seems to have its own api? like the following?
jimport( 'joomla.utilities.utility' );
function sendMail($from, $fromname, $recipient, $subject, $body, $mode=0, $cc=null, $bcc=null, $attachment=null, $replyto=null, $replytoname=null)
{
// Get a JMail instance
$mail = &JFactory::getMailer();
$mail->setSender(array($from, $fromname));
$mail->setSubject($subject);
$mail->setBody($body);
// Are we sending the email as HTML?
if ($mode) {
$mail->IsHTML(true);
}
$mail->addRecipient($recipient);
$mail->addCC($cc);
$mail->addBCC($bcc);
$mail->addAttachment($attachment);
// Take care of reply email addresses
if (is_array($replyto)) {
$numReplyTo = count($replyto);
for ($i=0; $i < $numReplyTo; $i++){
$mail->addReplyTo(array($replyto[$i], $replytoname[$i]));
}
} elseif (isset($replyto)) {
$mail->addReplyTo(array($replyto, $replytoname));
}
return $mail->Send();
}
I tried to use the above code but failed. The page just died.
Can you help me on how to send an email to the customer, and include the following two info?
(1) The bank account of the shop owner.
(2) A web-link that the customer should go and fill up some data after he/she has completed the money transfer.
Thank you so much.