d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Php Question
12Next
Add Reply New Topic New Poll
Banned
Posts: 986
Joined: Apr 20 2015
Gold: 25.00
Jun 28 2015 03:29pm
Is it possible to send an automatic email to a customer (sales website) containing a line a text in the database or text file, which is then removed after sent?

each line must be different from the last
Member
Posts: 1,358
Joined: Dec 30 2012
Gold: 0.10
Jun 28 2015 08:10pm
yeah its possible
Banned
Posts: 986
Joined: Apr 20 2015
Gold: 25.00
Jun 29 2015 01:45am
Well ended up buying a software to do it with. Can't get it working and the author isn't giving me support until the 7th of july which is kinda lame

Anyone will to take a look at it for me and let me know what im doing wrong?

Here is the product:
http://codecanyon.net/item/auto-send-virtual-keycard-products-image-codes/6797215

Problem is, image files aren't moving to the used folder after being used, it also doesn't send it through email. Im using localhost atm for testing. so i'm not sure if its permission based

This post was edited by Lanayaa on Jun 29 2015 01:46am
Member
Posts: 5,167
Joined: Nov 23 2006
Gold: 11.01
Jun 29 2015 05:57pm
Automatic email when? What event are they doing that triggers an email being sent?

You would just use a mail() function to send an email.


Break it down into steps and code each step.

1. Customer does specific event
2. query the DB for the string from DB you want to send.
3. save the string into a variable
4. use PHP mail() variable to mail the variable
5. remove the line from the DB

It's really not that hard to do depending on when you want the email to be sent. If it's on a form submit you just use an isset().

If you let me know more details I can try to code it up for you. However, it will not be in WP plugin form as I don't use WP.
Banned
Posts: 986
Joined: Apr 20 2015
Gold: 25.00
Jun 29 2015 08:35pm
Quote (HoneyBadger @ Jun 30 2015 11:57am)
Automatic email when? What event are they doing that triggers an email being sent?

You would just use a mail() function to send an email.


Break it down into steps and code each step.

1. Customer does specific event
2. query the DB for the string from DB you want to send.
3. save the string into a variable
4. use PHP mail() variable to mail the variable
5. remove the line from the DB

It's really not that hard to do depending on when you want the email to be sent. If it's on a form submit you just use an isset().

If you let me know more details I can try to code it up for you. However, it will not be in WP plugin form as I don't use WP.


Well its a sales website. So i guess the mail is sent after the paypal payment is completed.
Member
Posts: 18,620
Joined: Jul 26 2008
Gold: 777.00
Jun 29 2015 09:43pm
this is php that is so ez to do ;o depends on the implementation on how to make it scale through multiple servers tho
Banned
Posts: 986
Joined: Apr 20 2015
Gold: 25.00
Jun 30 2015 03:13am
Well i know you guys prob don't like spoon feeding people. But if you want to look at the script i have already to get a better idea of what i mean, i can pm it or post it here.

I know that after a paypal purchase it automatically sends a email with the order details to the purchasing email. So i guess i can just add the code to that email depending on what product they buy right?
Member
Posts: 5,167
Joined: Nov 23 2006
Gold: 11.01
Jun 30 2015 11:43am
Quote (Lanayaa @ Jun 30 2015 04:13am)
Well i know you guys prob don't like spoon feeding people. But if you want to look at the script i have already to get a better idea of what i mean, i can pm it or post it here.

I know that after a paypal purchase it automatically sends a email with the order details to the purchasing email. So i guess i can just add the code to that email depending on what product they buy right?


Post the script.

I'm not familiar with the paypal API but can you plug into their email they send out as confirmation?
Member
Posts: 30,168
Joined: Jun 10 2010
Gold: 1,157.00
Jun 30 2015 12:18pm
Quote (Lanayaa @ Jun 30 2015 05:13am)
Well i know you guys prob don't like spoon feeding people. But if you want to look at the script i have already to get a better idea of what i mean, i can pm it or post it here.

I know that after a paypal purchase it automatically sends a email with the order details to the purchasing email. So i guess i can just add the code to that email depending on what product they buy right?


with the paypal, u can send them to a url, instead of a email :D if ur looking for something like that
Banned
Posts: 986
Joined: Apr 20 2015
Gold: 25.00
Jun 30 2015 12:40pm
Well, its a script with lots of parts really...

If you would like me to just upload the entire script somewhere for you to look at?

because the scripts are quite long .-.

This post was edited by Lanayaa on Jun 30 2015 01:00pm
Go Back To Programming & Development Topic List
12Next
Add Reply New Topic New Poll