Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Email and SQL

Author  Topic 

skillile
Posting Yak Master

208 Posts

Posted - 2003-03-06 : 10:48:32
I am in need of direction for an email solution. Currently we have SQLmail set up to read the PSD file and depending on the return address it goes into a table assigned to a user in out DB. They then can have a simulated inbox.--Need to extend

I need a soution to allow for each one of my DB users to have an email account and send and receive email, docs and <b>end up in SQL</b> so I can then allow placement of documents to orders.

Where would you start and what do I need to do this the right way. Does anyone have any examples or references.

Thanks


slow down to move faster...

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-03-06 : 19:10:23
Well SQL Mail is not the answer, that's for sure. You will want to do the e-mailing thing on the application side. What do you mean by "end up in SQL"?

Tara
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-03-06 : 19:15:09
People are gonna email documents as attachments, and he wants to store them in the database.

DON'T DO IT!

Store the documents on the hard drive instead. You'll have a bitch of a time extracting them from the email anyway, trying to put them in SQL Server will kill you.

Go to Top of Page

skillile
Posting Yak Master

208 Posts

Posted - 2003-03-06 : 19:39:12
No sorry,

Myapp = my internet solution

I want to allow my users to have their own email addresses ie.

user@myapp.com
user2@myapp.com

These users will use this account to send myapp documents in the form of email attachments. At this point I will then store the path to the doc in the DB.

My question is how do I allow multiple emails to come in and be able to parse for the docs and store the paths. What do I need to do this?



slow down to move faster...
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-03-06 : 19:59:58
Two things:

SQL Mail: forget it. Like Tara said, it's not what you want to use for that. Get a real email server and set up real mailboxes/accounts. Write the application as if there is no such thing as SQL Mail.

Processing: Have the app handle the messages and use an ADO data layer to insert the data for the message into the database. DO NOT HAVE A SEPARATE TABLE FOR EACH USER. DO NOT. NO. Have a common table for this data and include a column that stores the user name/id/email address. Do not try to "integrate" the email with the SQL Server. Have the application get info from the mail server and put it into SQL Server, and handle the attachments itself. You will not gain anything from trying to program SQL Server to query the email server (unless you're using MS Exchange, but even that is a dog to deal with)

This is one of those examples where a middle tier application is best. The mail server does email and only email, the SQL Server does data and only data, and the app does all the grunt work.

Go to Top of Page

skillile
Posting Yak Master

208 Posts

Posted - 2003-03-06 : 21:07:02
thanks rob...

I wasn't going to seperate out the tables. Sorry to mislead you.

Is there an app that is canned to handle such a thing or do I need to write something to parse each mailbox on my mail server.



slow down to move faster...
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2003-03-06 : 21:35:35
That depends on your mail server.

Exchange has CDO, you could use that.
Other mail servers have hooks that will trigger scripts and programs when mail is recieved.
Failing that, you could buy a POP3 component (there are a few around).



Damian
Go to Top of Page
   

- Advertisement -