My website is not sending any email to my email address


I try to create a website for wedding invitation.

Problem: My website is not sending any email to my email.

When my friends or family fill and send a simple form,
The website should send the form which is the guest name,email and either they will attending to the wedding or not to my email address.

Here’s my mail.php

    $name = 'Name: '.$_POST[name]."\n";
    $email = 'E-mail: '.$_POST[email]."\n";
    $guest = "Guest's Name: ".$_POST[guest]."\n";
    $attending = '#Attending: '.$_POST[attending]."\n";

    $ip = getRealIpAddr();
    $message = "$name$email$guest$attending\n\nFrom page: ".urldecode($_SERVER['HTTP_REFERER'])."\nIP: $ip\nBrowser: ".$_SERVER['HTTP_USER_AGENT']."\n";
    $error = array();

    $mail =
    mail("[email protected]", "$title", $message,
     "From: [email protected]\r\n"
    ."Reply-To: [email protected]\r\n"
    ."X-Mailer: PHP/" . phpversion());

    function getRealIpAddr() {
            if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
            } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
            } else {
            return $ip;

You must use default PHP Mail function to use that form.
But that function is disabled for this free hosting:


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.