Jump to content

[SOLVED] Problem with php mail


affordit

Recommended Posts

The first part of the script below works but I can't get the second part to send me an email with the actual question the visitor asked can some help.

 

<?php

$to = "$email";

$subject = "Question";

$message="Thank you for your question we will contact you at $email with the answer";

$headers = "From: me@there";

$sent = mail($to, $subject, $message, $headers) ;

if($sent)

{print "We have sent you a conformation email to $email"; }

else

{print "We encountered an error sending your mail"; }

 

$to = "me@there";

$subject = "Question";

$message="message";

$headers = "From: visitors email";

$sent = mail($to, $subject, $message, $headers) ;

if($sent)

{print "Your mail was sent successfully"; }

else

{print "We encountered an error sending your mail"; }

 

?>

Link to comment
https://forums.phpfreaks.com/topic/86401-solved-problem-with-php-mail/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.