How do I allow users to send me emails?

0 favourites
  • That didn't work:( You can't have a another folder wrapped over the index folder... The index folder has to be the root folder in public_html.

    When I set this file structure, it didn't work:

    This is the message I got:

    404. That’s an error.

    The requested URL was not found on this server.

    I just read you post. Can I please get some advice from you. I still can't get this thing to work... How did you finally get it to work?

  • sizcoz, is everything in these event sheet lines correct?

    Event Sheet:

  • Make sure your server file permissions are ok

    644 for files

    755 for directories

    Your events look ok.

    I once had a problem with my server when I used their website builder, so I had to disable that.

    Other than that, I'm afraid its just a process of elimination.

  • Hey this is what my permission settings look like...

    c2mail.php File Permission Settings (in Filezilla):

    Directory Permission Settings (in Filezilla):

  • Hey sizcoz, did you look at my permission settings? Are they correct?

  • Are you sure nothing's wrong t=with my php file?

    Am I supposed to leave the headers 'From' and 'Reply-To', as ""?


    $to = $_POST['email_to'];

    $subject = $_POST['subject'];

    $message = $_POST['message'];

    $headers = 'From:' . "\r\n" .

    'Reply-To:' . "\r\n" .

    'X-Mailer: PHP/' . phpversion();

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

    echo "Message sent at ";

    echo date ("h:i:s");


    If this is not the problem, then it must be a file structure problem... Can someone please help me? How did you end up getting it to work?

  • First of all in your events

    You first POST to the php file, then you request it? That is not needed. If you POST, you will still get whatever result. In your case "Message sent at bla" So you can just wait for AJAX on "email" complete.

    Try this php

    You should get the "Email sent" back. This doesn´t mean that the email was actually sent though, there can still be an error on the server but iirc you can´t really check that unless you review the server logs.

  • Yep

    Sorry about the late post, there were several errors on the events.

    1. There was as explained no need to request.
    2. The first event was not updating because it was "on start of layout".
    3. There was an incorrect "tag"

    Anyway here is the C3 tested events, this works, the php file does not have to change, I will put a link to an example in C3 below, it will be sent to your Junk mail.

    Just as a side note in the php you have to use a valid 'from' and 'to' email address (usually yours)

    Link to C3 test

    Have also updated the tutorial to reflect the changes made

  • (Thanks... one step closer.) Okay, so I've...

    - Deleted the request line.

    - I didn't see any event that was "on start of layout".

    - Changed the "tag" (to "email").

    ... but it's still not working:(

    The event sheet seems fine (please check it), so there must be something wrong still with the Php Code...

    When you say valid 'from' and 'to' email address, do I use my Hotmail address for both of the 'from' and 'to' areas... or do I need two seperate email addresses?

    New Event Sheet and Php Code:

    Do I need to make a "domain email" for the 'from' area... and then use my Hotmail email for the 'to' area?

    Domain Email:

  • sizcoz... What could possibly be the problem?!

    How is it working on your end, but not mine? We're using the exact same code.

    What hosting site are you using?

    Is there a problem with 000webhost servers?

    I've done everything you told me, but still nothing.

    Please, I really need your help... Exactly how are you getting it to work on your end?

  • Bump. I really need some help.

  • Does 000webhost even allow php emailing, for free? I can't find any info telling me if it does allow it or doesn't.

    What are some free hosting sites that allow for php emailing?

    Please guys... I really need to figure out emailing, or my dream of making websites with Construct 3 will be just that... a dream. Please, can someone help me out with this... Knowing how to send email, is critical for website development!

  • Well you could always send a mail to the 000webhost support and ask them, they probably know best if they support it. If their free plan doesn´t cover it, their paid one might. Or find a different free host that does allow php mail.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I just tried with, and it's still NOT working.

    Pleeeeeeeease... Help me.

    How is it working on your end, but not mine -- over and over again (did you leave something out of the tutorial -- like the server your using, how to make a domain email (if you need one), and how you structure the index.html folder and c2mail.php file in your FTP transfer tool)?

    I'm so confused.

    I'm following your sizcoz tutorial to the letter, and it's not working (using two different hosting websites).

  • Forget it. I found a solution. I'm just going to use this method instead...

    Thanks dop2000! You're the best! Thanks for the working tutorial!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)