Farklı bir sayfa kodları yürütmek ama aynı gerçek php sayfasında kalır

1 Cevap php

I have a complicated problem here..I have codes to send mail using PEAR which i have tested in a php page called testmail.php. Now i have my actual application an a page called Cart.php where i have a button called Place Order. When i click on this button, it actually redirects to a url called : http://localhost/final/index.php?OrderSuccessful which actually displays a message on the page and sends an email. The problem is that when i put the code for email in Cart.php, i get errors. But when i put the url http://localhost/final/testmail.php it actually works. So i was thinking, is there a way to execute the codes from that testmail.php by remaining on the page Cart.php?

include('Mail.php');
$mail = Mail::factory("mail");

$headers = array("From"=>"xyz@gmail.com", "Subject"=>"Your order has been placed   ");
$body = "lol";
$mail->send("abc@live.com", $headers, $body);

Ben hata alıyorum

Assigning the return value of new by reference is deprecated

1 Cevap

Eğer eski kodu var gibi görünüyor. Burada ipuçlarını izleyin:

http://stackoverflow.com/questions/2612684/errno-8192-when-trying-to-send-mail