Sending a form to an email

Get help using Construct 2

Post » Wed Jul 20, 2016 8:21 pm

Basically I want to make an app where the user just fills in a form and then that information can be sent with a click of a button to a specific email.

Is that possible to do in construct at all? I tried some examples but couldnt get any of them to work
B
40
S
15
G
4
Posts: 426
Reputation: 5,843

Post » Wed Jul 20, 2016 8:42 pm

Hi blurymind,

of course; with C2 (nearly) everything is possible!

The easiest way, which comes in my mind, is using the AJAX plugin to give over informations to a PHP script. Take a look at: http://teachingyou.net/php/simple-php-c ... sing-ajax/ - that should do the trick (transfer your data from your project with POST to the backend script and see the magic happen).

You could also take a look in here (dont know the current state of the plugin): send-emails-with-construct_t167741
or
https://www.scirra.com/store/royalty-fr ... sender-156

In any way you'll also need a SMTP server.

Regards
Proxy
B
24
S
14
G
9
Posts: 118
Reputation: 6,799

Post » Wed Jul 20, 2016 9:47 pm

is it possible to do it without smtp?
http://stackoverflow.com/questions/2513 ... using-smtp
B
40
S
15
G
4
Posts: 426
Reputation: 5,843

Post » Wed Jul 20, 2016 11:11 pm

blurymind wrote:is it possible to do it without smtp?
http://stackoverflow.com/questions/2513 ... using-smtp


Hi again,

as far as I know its not possible to send a mail without an outgoing server. The only way without having a smtp server, which comes in my mind, is setting up a temporary, local, one. The problem could be (in fact, its a great thing - but not for your idea ;) ), that most hosters (aol, hotmail, gmx, etc.) will definatly decline your mail (not even putting it into spam - it just wont be delivered) because your IP may be "unknown" (or you just got one, which was banned before).. chances are huge, when setting up a local smtp on a not static IP, that your users will run into this. Maybe checking a users IP (tools like http://mxtoolbox.com/blacklists.aspx) could secure, that a sended mail will be delivered, but dont count on that.

You could possibly just setup a new outlook.com account; enable pop/imap functionality (in order to also enable external mailsending via smtp) or get a domainhosting. Dont know about free-mailhostings if you can "spoof" your sender-address (turning [email protected] into [email protected] - but I dont think that free hoster will do so); otherwise the reciever will get your sended mails with its original domain (@outlook.com or something).

(in short: easiest is getting a hosted domain with mails; setting up a php backend-script and sending mails over that - that will secure that your mails are delivered in *any* case and that you got a professional looking domain like "[email protected]" and not a junky one like "[email protected]" ;) )

You may want to read this: http://superuser.com/a/1006087

Regards
Proxy
B
24
S
14
G
9
Posts: 118
Reputation: 6,799

Post » Sat Jul 23, 2016 3:49 pm

blurymind wrote:is it possible to do it without smtp?
http://stackoverflow.com/questions/2513 ... using-smtp


Why would you want to reinvent the wheel?
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Sat Jul 23, 2016 10:12 pm

Hi here's a tutorial I wrote some time ago.

https://www.scirra.com/tutorials/4897/sending-an-email-from-construct2

Hope this helps.
Bushy Ball\Boatman Bill\Sticky Web\Snake

Image ImageImageImage

During the gold rush it was a good time to be in the pick and shovel business
B
46
S
14
Posts: 252
Reputation: 5,352

Post » Tue Jul 26, 2016 5:49 pm

Thank you guys. Great feedback !
B
40
S
15
G
4
Posts: 426
Reputation: 5,843


Return to How do I....?

Who is online

Users browsing this forum: mcscooter, TRMG and 20 guests