Jump to content

Mail not working?


Cultureshock

Recommended Posts

I haven't heard anything from my host about the mail not working, so could someone instruct me on how to use php to email stuff?

 

Here's what I have so far:

<?php
$email = $_POST['email'];
$name = $_POST['name'];

$to = "[email protected]";
$subject = "hey, " . $name . " requests an invite.";
$body = "Through site form. Email: ".$name." ... ... ... ";
$headers = "From: [email protected]\r\n" .
    "X-Mailer: Cultureshock";
if (mail($to, $subject, $body, $headers)) {
header('location:/register.php?action=win');
}else{
header('location:/register.php?action=lose');
}; ?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/184489-mail-not-working/
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.