my problem didnt solve please help me!!!

A

Anonymous

Guest
i write this script and run it on a webserver ,when i went to its address (on the web) i got no error but in mailbox (of raminkit) i didnt got any meessage please help me
Code:
<?php
$mail_to="raminkit@yahoo.com";
$mail_from="shahinkit@yahoo.com";
$mail_reply_to="raminkit@yahoo.com";
$mail_cc="shahinkit@yahoo.com";
$mail_bcc="nooshinkit@yahoo.com";
$mail_headers= "From: $mail_from\r\n\Reply-to: $mail_reply_to\r\n\Cc: $mail_cc\r\nBcc: $mail_bcc";
$mail_subject="php mail test!";
$mail_body="i want to test mail in php .Response me !";
if(mail($mail_to, $mail_subject, $mail_body, $mail_headers))
       echo("ok");
else
echo("no");
?>
 
Use error_reporting(E_ALL); at first in your code so you can be notified about every little error!
 
Yeah, E_ALL is turned on as default on my dev server: i have now found an easy solution to make the code 100% compatible =)

Not that it has ever been hard, but its muuuuch easier that way =)
 
ahahaha, i ment i have a better solution how to make all the code E_ALL compatible ;)
Try making a 100% OOP-only code NOT E_ALL compatible and nothing will really work like you want to..
But the thing is that you simply work your way through all the notices you get and.. and it works, after a few days of painfull adaptations: you dont iven get notices anymore: your code is clean and working =)
 
Oh i get... that's right! My code is 90% OOP based and yes... now i see i start getting less errors since that! :D
 
MVC stands for Model, View, Controller.
It is a commonly used and powerful architecture for GUIs.
MVC is best described as what is often known as a design pattern. A design pattern is best defined as a description of a reusable solution to a recurring problem given a particular context.

In this case (OOP), MVC is the solution to best separate the user ontrol of a program (the controller), its output (the view), and its inner processing and decision-making (the model) into a manner whereby they represent three distinct, separable components.

MVC in Web Applications
MVC is considered bu some to be the evolution of IPO (Input, Processing, Output), which was the best-practice model applied to the linear, text-only applications of yesteryear.

The model is represented by your suite of classes, assuming that you have followed an object-oriented approach in your application. In any web language this classes perform the core communication with any external data source, make critical application decisions, and perform parsing and processing on both input and output.

The view is represented by the web browser, or rather what is displyed in it. Upon making a request, be it a simple request for a page or an introdution to update or query a database, the output determined by the model is actually displyed by the web browser.

The controller is also represented by the web browser or rather the users' actions within it. Whether just a series of links or a comples form, the GET and POST requests made by the users' browser represente the effort to get data into the model in the first place.
 
Wow , very nice information. Thanx, gesf. Provide me any link regarding this so that i may refer it further.

ThanX
 
try this
Code:
<?php
if(mail("yourself@yourdomain.com", "test subject", "test body"))
       echo("ok");
else
  echo("no");
?>

if this does not work check your php.ini file for the SMTP server.
 
Back
Top