Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $addid = "orderid.txt";
- $current = file_get_contents($addid) + 1;
- echo $current;
- file_put_contents($addid, $current);
- ?>
- <?php
- // Lue tilauksen ID sähköpostia varten
- $orderid = "orderid.txt";
- $ordernumber = file_get_contents($orderid);
- // Kirjoita kuitti
- require('receipt.php');
- ?>
- <?php
- //Lähetä tilausvahvistus
- require_once('mail/class.phpmailer.php');
- $path = "kuitit/kuitti".$orderid.".pdf";
- $bodytext = '
- Olemme vastaanottaneet tilauksenne '. $ordernumber .'.
- Tilaamanne tuotteet löytyvät liitteestä.'
- ;
- $email = new PHPMailer();
- $email->From = 'no-reply@coverlinefilms.fi';
- $email->FromName = 'no-reply@coverlinefilms.fi';
- $email->Subject = 'Olemme vastaanottaneet tilauksenne ' . $ordernumber;
- $email->Body = $bodytext;
- $email->AddAddress('christian.nikkanen@gmail.com');
- $email->AddAttachment($path, 'kuitti777.pdf');
- return $email->Send();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement