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 = "cultureshocksc@gmail.com";
$subject = "hey, " . $name . " requests an invite.";
$body = "Through site form. Email: ".$name." ... ... ... ";
$headers = "From: noreply@the-vir.us\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
Share on other sites

Huh.

 

Anyway, Telnet your mail server. Usually mail/smtp.yourdomain.com with port 25. If this is unreachable, than I doubt you can e-mail from it. This is the only way you can physically send an e-mail, without using a third party SMTP host.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.