Question

Locked

PHP Form Problem

By MikRei75 ·
I have design a contact us page with a php form coding in it, and it is sending to the email but it will not show who send the email.

I have a form with email field to fill in, but it will not put it in the from field, what do I need to do to fix this?

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

PHP Send Mail

by mike0351 In reply to PHP Form Problem

<?php
$ToAddress = "ToName@example.com";

$Subject = "An example email";

$BodyContent = "This is an example.\n\nJust an example.";

$FromHeaderLine = "From: FromName@example.com";

$success = mail( $ToAddress,
$Subject,
$BodyContent,
$FromHeaderLine
);

if( $success ) { echo "Email sent."; }
else { echo "Unable to send email."; }
?>

This will send plain text emails.

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums