Seeking Clarification on the Tutorial: "Sending an Email From Construct 2"

  • Hey lovely people,

    Some of you cool cats be familiar with the tutorial, "Sending an Email from Construct2" by the insightful sizcoz (https://www.scirra.com/tutorials/4897/sending-an-email-from-construct2/revisions). From what I can tell, this is the most up-to-date way to be able to have users send emails from within a Construct 2 game. I have not worked with such a method before, and I have a few questions I'm hoping you folks can answer.

    Is this method still supported?

    Has anyone successfully used this method recently? For reference, I'm on r265 (64-bit). I'll tag 8tomo8,idris47R, and Ricci here since they've left comments on the tutorial page in the past year, and hopefully would like to share their perspective. :)

    What exactly is meant in Step 5?

    This may be a silly question, but how exactly am I supposed to export my file? The directions say;

    "Export the capx to your web host as a html5 project."

    However, if I click File>Export Project>HTMTL5 website I do not believe this generates a capx file. Correct me if I'm wrong, but the only way to generate a capx file is to click File>Save as Single File. But that technically isn't exporting, right?

    Web Host Web space vs webhost (site)

    At the end of the tutorial, under the heading "Try it !!", Sizcoz writes a brief checklist:

    ---

    1) You have downloaded the Capx.

    2) You have changed the URL in Ajax -- Send, to your own URL.

    3) You have written the PHP Script file, and put it on your Web Host Web space.

    4) You have exported your capx to your webhost (site)

    ---

    I'm not sure what the difference is between these two terms. This too, may be an idiot question. A friend of mine runs a server, and has kindly granted me access to a small portion of it for the use of this email tool. Please forgive me if I lack basic knowledge here, as I am still learning the basics of server operations.

    I access the server through FileZilla by plugging in the server address, my username, and my password - then pressing "Quickconnect". This pulls up my "room" in the server, in the bottom-right of the FileZilla window. It is a single-folder directory that I can add files and folders to, and download from. I am not sure if this space is the "web Host Web space" or the "webhost (site)" that the tutorial's author refers to. I don't suppose the answer is obvious to you gracious lads?

    I look forward to your feedback. Have a great week!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi

    You just export your project with the html5 option, this creates a zip file.

    You then unzip it so its a folder

    You then put this folder on your server via FileZilla.

    You then do the same with the php file via FileZilla.

    It works in C2, It should work in C3, but you may need to use Https.

    Cheers

  • Thank you, my friend! I'll give this a try tonight.

  • I can't help but notice that there's no mention of the need to URLEncode user-entered data in the tutorial (https://www.scirra.com/tutorials/4897/sending-an-email-from-construct2/revisions).

    I've been having trouble with POST, so I wonder if that's something I need to be exploring?

  • This encodes or decodes a string using URL Encoding. URL Encoding is used when placing text in a query string to avoid it being confused with the URL itself. It is normally used when the browser sends form data to a web server.

    URL Encoding replaces “unsafe” characters with ‘%’ followed by their hex equivalent. Characters which need not be escaped.

    Edit.

    I have just noticed on the tutorial from years back that the "tags" are not named the same, so make sure the "tags" are the same also check your syntax on the data, as it is very easy to make a mistake here.

    cheers.

  • Ah, I see. Thank you for the advice.

    I managed to get it to work.

    DEAR FUTURE READERS: Please contact me if you're having trouble with a project like this! I am no expert but am happy to share my experience. :)

  • TeaSea I've been trying to get this to work for the past 2 days. The tutorial is a bit odd in the sense that the code is presented in a picture instead of something that can either be downloaded or copy/pasted, but that's fine I guess.

    When I try to use the program, I get an error on my site telling me that something has been blocked. When I grant that permission, I lose my site's https and it's labelled as not secure.

    The issue I have is that I do not know where to put the code. Sometimes I see that you just have to upload it to your server. Sometimes I see that you have to have the php code on the root of your website.

    Do I have to give things special permissions?

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