<?php $to = "someone@exampl e.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@exa mple.com";
$headers = "From: $from";
mail($to,$subje ct,$message,$he aders);
echo "Mail Sent.";?>
The above is the standard example for a simple email sender.
I have long letters in text and doc formats. Call them letter.txt. or letter.doc
How can I have the computer read the documents into the "$message" line?
The following line does not work.
$message=letter .txt;
How can I get it to work properly?
Or is this just impossible to do?
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@exa mple.com";
$headers = "From: $from";
mail($to,$subje ct,$message,$he aders);
echo "Mail Sent.";?>
The above is the standard example for a simple email sender.
I have long letters in text and doc formats. Call them letter.txt. or letter.doc
How can I have the computer read the documents into the "$message" line?
The following line does not work.
$message=letter .txt;
How can I get it to work properly?
Or is this just impossible to do?
Comment