September 20, 2011 at 12:36 am
I have create a website.the customer send the query in my mail that query how to store in database.
I want to read the inbox message ,that message how to store in database.
September 20, 2011 at 4:35 am
it really depends on what mail system you are using, for exchange 2010 you can use the webservice to get the mail message and then store this in your database. Other mail services 'should' have similar apis/web services.
September 20, 2011 at 4:35 am
You may look at SQLMail option. (Am not talking about DBMail).
There are system procedures to read the data of inbox mails.Please google out it been long time that worked on it.
September 20, 2011 at 4:37 am
vinaseetha87 (9/20/2011)
I have create a website.the customer send the query in my mail that query how to store in database.I want to read the inbox message ,that message how to store in database.
you'll have to write something in a programming language to connect to the mail server, get the list of messages, read the messages, optionally send the delete command for the messages, and then do something, like put the data in your database.
SQL Server does not have the ability, natively, to read a mailbox full of emails. there's lots of examples on the web on how to do this in .NET, let us know what you've tried. you could build something outside of SQL, and have it enter the data on a scheduled task, or call that program as a CLR or from xp_cmdshell.
i'd recommend the scheduled task route.
it would be a lot easier to use a web pages form submission to store the data, instead of the round about way you're thinking of with an email box.
Lowell
September 20, 2011 at 4:41 am
sqlzealot-81 (9/20/2011)
You may look at SQLMail option. (Am not talking about DBMail).There are system procedures to read the data of inbox mails.Please google out it been long time that worked on it.
Please refer this link...
September 20, 2011 at 4:55 am
vinaseetha87 (9/20/2011)
I have create a website.the customer send the query in my mail that query how to store in database.I want to read the inbox message ,that message how to store in database.
Just a work-around only, Create a shared folder and tell the user to put the query in a txt file named with username. Schedule a job to import the data from the txt file and read it.
----------
Ashish
September 20, 2011 at 4:55 am
I agree with Lowel , the correct approach would be log all queries in the database via a normal procedure call from a query webapge with text boxes. Routing queries via email is not a scalable and long term solution.
Security is another issue.
CLR is the way to go . I wouldn't suggest SQL Mail on a higher enviornment.
September 20, 2011 at 5:10 am
i would avoid SQLmail especially since you are runnig SQL 2008.
September 20, 2011 at 5:51 am
Jayanth_Kurup (9/20/2011)
Security is another issue.
CLR is the way to go . I wouldn't suggest SQL Mail on a higher enviornment.
Could you please let me know the issues that youi look for, for my understanding plz?
September 20, 2011 at 5:52 am
steveb. (9/20/2011)
i would avoid SQLmail especially since you are runnig SQL 2008.
Why is this? It is a deprecated feature for future versions. However it works in 2008 R2 as far as I know. Could you please explain the same for my understanding again?
September 20, 2011 at 6:05 am
sqlzealot-81 (9/20/2011)
steveb. (9/20/2011)
i would avoid SQLmail especially since you are runnig SQL 2008.Why is this? It is a deprecated feature for future versions. However it works in 2008 R2 as far as I know. Could you please explain the same for my understanding again?
because it uses MAPI to communicate with the mail server, which requires outlook to be installed on the SQL server (not really a great idea) and service broker to be enabled. Basically it just acts as a wrapper for the MAPI calls and there are much cleaner ways to use this interface (if required) by using an application language as had been suggested.
DBmail uses SMTP which is fast and efficent.
September 20, 2011 at 6:08 am
from the link that was posted, i also noticed you cannot use SQLMail with 64 bit SQL.
it's kind of hard to not use 64 bit with anything that's reasonably new hardware.
Lowell
September 20, 2011 at 6:19 am
September 20, 2011 at 10:46 pm
Thanks you for all for replies with the great explanations!!! I buy it!!!
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply