Bear with me, I'm new here and new to PHP...at first I thought it was just me, so I started trying to copy and paste example code I found online...but even that seemed not to work.
I've tried this:
$to = "my@email.com";
$subject = "BUSINESS";
$message = "blah";
$headers = "From: my@email.com"
$send_contact = mail($to,$subject,$message,$headers);
// Check, if message sent to your email "We've recived your information"
if($send_contact){ echo "We've recived your contact information"; }
else { echo "ERROR"; }
And even just...
mail("my@email.com","BUSINESS","blah","From: my@email.com");
And finally this:
$to = "my@email.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: my@email.com" . "\r\n" .
"CC: somebodyelse@example.com";
if(mail($to,$subject,$txt,$headers)){ echo "We've recived your contact information"; }
else { echo "ERROR2"; }
I've tried it with double "quotes", single 'quotes', putting the information I wanted directly in, skipping the variables altogther, removing the function except for the last if statement to see if it gives an error. Now obviously I used my own personal emails here, and not my@email.com, but you get the idea...
The server is a windows server (unfortunately :p) if that makes any difference.
Please help me out...What am I doing wrong here? It always seems to at least show "Error" so I'm pretty sure it isn't invalid syntax since when that's the issue I usually just get a white blank page with Firefox.