Email, with attachments $_POST problems, with multipart

Get help using Construct 2

Post » Sat Dec 05, 2015 10:39 pm

Hi
I have posted the tutorial https://www.scirra.com/tutorials/4897/s ... construct2
Sending basic email works fine from C2 with my method in the tutorial above, but someone has requested if you can do email with attachments.
Now, I have got this working with PHP alone, multipart header and base 64, but when It comes to getting the $_POST from c2 it comes out with an array() blank.
I can't figure out what is wrong.
I will post a screen of the code below, maybe someone can help?
If you subsitute the $_POST for an email address..i.e..."[email protected]" it works.
Image

Obviously, We can do this with 3rd party plugins (mandril etc), but reliance on 3rd party is always suspect to future change

cheers sizcoz
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
45
S
13
Posts: 248
Reputation: 5,249

Post » Sun Dec 06, 2015 3:12 pm

Anybody ?
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
45
S
13
Posts: 248
Reputation: 5,249

Post » Wed Dec 09, 2015 5:13 pm

lol.
B
72
S
16
G
2
Posts: 46
Reputation: 6,297

Post » Thu Dec 10, 2015 12:02 am

I am a bit stumbled on what exactly your issue is, is it to get the Post value "email_to" be an mail address when posting from Construct 2?

Or is it to read the output of the php in construct 2?

If the issue is to get construct 2 to send out an mail address we will need to see the construct 2 part.

But yeah a bit stumbled on what exactly is the issue, hopefully you can clear that up for me and il be more than happy to help you out! :)
B
14
S
3
Posts: 25
Reputation: 799

Post » Thu Dec 10, 2015 6:02 pm

kentbakk wrote:I am a bit stumbled on what exactly your issue is, is it to get the Post value "email_to" be an mail address when posting from Construct 2?

Or is it to read the output of the php in construct 2?

If the issue is to get construct 2 to send out an mail address we will need to see the construct 2 part.

But yeah a bit stumbled on what exactly is the issue, hopefully you can clear that up for me and il be more than happy to help you out! :)


@Kentbakk
Its getting the $_POST['email_to'] variable from c2, it does not seem to appear when I run the php script, I am using the same method that I used in the tutorial I posted, the capx is here, https://www.scirra.com/tutorials/4897/s ... construct2,
I can send an email without attachment with the method in my tutorial, and send an email with attachment with this script above, if I change the POST value to, for instance "[email protected]";, but the POST variable from c2 does not show?
Many thanks in advance for your reply
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
45
S
13
Posts: 248
Reputation: 5,249

Post » Thu Dec 10, 2015 6:12 pm

sizcoz wrote:
kentbakk wrote:I am a bit stumbled on what exactly your issue is, is it to get the Post value "email_to" be an mail address when posting from Construct 2?

Or is it to read the output of the php in construct 2?

If the issue is to get construct 2 to send out an mail address we will need to see the construct 2 part.

But yeah a bit stumbled on what exactly is the issue, hopefully you can clear that up for me and il be more than happy to help you out! :)


@Kentbakk
Its getting the $_POST['email_to'] variable from c2, it does not seem to appear when I run the php script, I am using the same method that I used in the tutorial I posted, the capx is here, https://www.scirra.com/tutorials/4897/s ... construct2,
I can send an email without attachment with the method in my tutorial, and send an email with attachment with this script above, if I change the POST value to, for instance "[email protected]";, but the POST variable from c2 does not show?
Many thanks in advance for your reply



Okay i see, il do some testing and come back to you :)
Could you send me the php code in text format tough?
B
14
S
3
Posts: 25
Reputation: 799

Post » Thu Dec 10, 2015 6:21 pm

kentbakk wrote:
sizcoz wrote:
kentbakk wrote:I am a bit stumbled on what exactly your issue is, is it to get the Post value "email_to" be an mail address when posting from Construct 2?

Or is it to read the output of the php in construct 2?

If the issue is to get construct 2 to send out an mail address we will need to see the construct 2 part.

But yeah a bit stumbled on what exactly is the issue, hopefully you can clear that up for me and il be more than happy to help you out! :)


@Kentbakk
Its getting the $_POST['email_to'] variable from c2, it does not seem to appear when I run the php script, I am using the same method that I used in the tutorial I posted, the capx is here, https://www.scirra.com/tutorials/4897/s ... construct2,
I can send an email without attachment with the method in my tutorial, and send an email with attachment with this script above, if I change the POST value to, for instance "[email protected]";, but the POST variable from c2 does not show?
Many thanks in advance for your reply



Okay i see, il do some testing and come back to you :)
Could you send me the php code in text format tough?


ok pm me your email, and i will send it.
Thanks again
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
45
S
13
Posts: 248
Reputation: 5,249

Post » Thu Dec 10, 2015 6:45 pm

ok pm me your email, and i will send it.
Thanks again


You can send it to [email protected]
B
14
S
3
Posts: 25
Reputation: 799

Post » Thu Dec 10, 2015 6:50 pm

kentbakk wrote:
ok pm me your email, and i will send it.
Thanks again


You can send it to [email protected]


Sent.

Cheers
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
45
S
13
Posts: 248
Reputation: 5,249

Post » Mon Dec 21, 2015 7:30 pm

Hi guys! Attachment method works? It's important for me.. Thanks!
B
52
S
32
G
13
Posts: 241
Reputation: 11,831

Next

Return to How do I....?

Who is online

Users browsing this forum: datiel12, tarek2 and 61 guests