I ask for help after several hours trying to figure it out myself.
I have the following code that I would like to send an email via email.
Here is my code:
$emailme = "myemail@somewhere.com";
$subject = "Randomly selected from array";
$headers = "From: $emailme\n";
$message = "Here is the Randomly selected from array.\n
Random text: $r_array";
$r_array=file('file.txt');
shuffle($r_array);
$output = "<p><center><b>The Randomly Selected Text is:</b></p><b>" .
$r_array[0] . "All done, echoing results.";
mail($emailme,$subject,$message,$headers);
So far, I could display the results on the screen, but could not send the results by email.
source
share