Jump to content

mysql queries via email


l0ve2hat3

Recommended Posts

 

An email to SQL??

 

Not really possible without running some kind of external process launch from outlook or somthing but even then you have to sent the email data to SQL.

 

could you explain more of what your thinking please?

 

regards

Liam

Link to comment
Share on other sites

Sure.  Say I have a bank and I want my customers to be able to email or send a text containing the word "BALANCE" to an email address and from there I can get the customers email and what they want, transform that into an SQL statement "SELECT balance FROM account_info WHERE email='$customerEmail' ". Then send a email back with the balance.  Chase Bank does this

Link to comment
Share on other sites

what you mean is how do i use the mail function for php to send echoed results in html........

 

the processing of the code is done via the server and then echoed into a mail function with html

then sent to the user that what you want..........

Link to comment
Share on other sites

it can all be done via sessions and mail function and a database but there no point lol,

the reason for programming in php is to let the php do all the work on the server and if be

post results to a user not get the mail function to do the querys for you that madness but

a good thinking point for a programmer.......

Link to comment
Share on other sites

So what your saying is goto a web site and login then ask for your balence, Then the web site emails that user with there balance....

 

well if so that all done with the users id in the url link off the sent email, they press that link from the email the

link goes to the server pulls the users info out via that url session md5 and salted then sends them the info back to there email account....

 

That crazy when the user who loged in should off been able to read the balance there and then........

Link to comment
Share on other sites

insecure as hell.. i have a pinsentry to login to my bank account.. i need my bank card and my pin and then my online account number and password... your requires a email....

 

you can do it but your need to create a online mail client (without the interface) with a cron to check mail box..

 

Oh btw whats the name of this bank.. i need some extra cash!

Link to comment
Share on other sites

OK YOU GUYS ARE LOSING ME. CHASE BANK LETS YOU REGISTER A CELL PHONE NUMBER ON THERE WEBSITE AFTER YOU LOGIN. OH AND BTW ITS ONLY YOUR BALANCE NOT UR ACCOUNT NUMBER, C'MON A LITTLE COMMON SENSE HERE AND IF YOU DONT KNOW A TEXT IS THE SAME AS AN EMAIL EX. 6315555555@VTEXT.COM (VERIZON CELLPHONE).  NOW FROM THERE AFTER YOUR REGISTERED YOU CAN SEND A TEXT FROM YOUR PHONE WITH "BALANCE" AND RECIEVE A TEXT BACK WITH YOUR BALANCE.

 

ALL I WANT IS SOMEONE TO POINT ME IN A DIRECTION. NOT WRITE THE CODE

Link to comment
Share on other sites

Ok as a programmer this project is the bigist FLOOR ever discused it so bad it like saying goto a bank

just enter your pin and your get your balance that stupid there a thing called a bank card.........

 

i am not going to help anybody to craete a system were the user can get any deatals relating to there email

address or there ip.

 

yes it can be done but it such insecure i am not involved lol....

 

good luck your need it.....

 

 

 

 

 

 

 

Link to comment
Share on other sites

Now your asking a diffrent quistion.

 

Your asking It as a mobile phone text not a email account....

 

That totaly diffrent...............

 

if it a mobile phone that receves the balence off course it secure .

 

It all down to the bank provider working with the mobile provider to secure the text...

 

secure via sim and phone it self.....

 

that not what you wanted from the begining............

 

 

 

Link to comment
Share on other sites

Not so much insecure as just totaly pointless. I can understand a text message, but when access the internet to log into your email to send an email to receive an email with your balance when you could just log into the site and click balance.

 

If you really want to go ahead with it then you would have to look into using a mailserver with a mysql database (or another accessable database) and search through the emails on some sort of cron job for emails with balance in the subject.

 

I read up about phones and this can be done on linux system by connecting an old nokia phone by database and text messages are stored in a MySQL databae and you would search that.

 

still which ever way as said it is insecure and the email side of it is more work then just logging into your site and clicking on balance.

 

EDIT: l0ve2hat3 I did use some sence and guess you wasn't a bank. but it was kind of a bad example lol

 

regards

Liam

Link to comment
Share on other sites

Firstly, you would need to look at using the imap extension in conjunction with a cronjob to check your mailbox for emails every few minutes.

 

You would then need to parse the email (likely with preg_match) for the relevent information.

 

From there, use that information to form an sql query, execute that query using mysql_query and its related functions.

 

Once you have the data you require, concatinate it into a message and send it via mail.

Link to comment
Share on other sites

thorpe that so true but it got more holes then a hole...........................

 

thorpe it floored man................

 

1. you need to be the sole owner off the database server...

2. you need more band width then god got....

 

it just stupid man

 

Do what thorpe said makes sence but issint secure i say

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.