Sending email

Assuming the server is configured correctly, it is very easy to send email with PHP using the mail( ) function.
mail( ) takes 3 parameters:
to the email address of the recipient – separate multiple addresses with commas
subject the subject line of the email
message the body of the email
mail( ) takes a 4th optional parameter for additional headers such as from, cc, etc
$to = “smorosko@starkstate.edu”;
$subject = “Test email”;
$message = “This is my email message.”;
mail( $to, $subject, $message );
The lab does not support email so this is for your own information

|