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 2005 Forums
 Transact-SQL (2005)
 Is it possible to download emails to SQL server

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2007-02-10 : 08:32:45
I am currenctly using sql server 2005 and would like to create a JOB to download emails. is it possible.

Please help thank you very much for the information.

Kristen
Test

22859 Posts

Posted - 2007-02-10 : 08:54:18
sp_processmail ?? or xp_findnextmsg and xp_readmail??

Kristen
Go to Top of Page

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2007-02-12 : 10:34:09
Hello Kristen,

But i read lot of them are not available in sql server 2005.

xp_readmail etc...

Please help thank you very much.

quote:
Originally posted by Kristen

sp_processmail ?? or xp_findnextmsg and xp_readmail??

Kristen


Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-02-12 : 10:39:16
download mails from where?
store what and how?



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-12 : 10:45:18
Where did you read that? xp_readmail is still available in SQL Server 2005.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-02-12 : 10:51:45
yes but
quote:

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.



so better not use it anyway

Database mail in SS2k5 is completly rewritten to use SMTP instead of Mapi so you don't have to install outlook on the server

And mail importing is IMO done in a different direction.
from an app to sql server.

If you want to import mails from exchange (why would you want to do that is a different matter)
you can setup a linked server to exchange and use simple T-SQL:
http://msdn2.microsoft.com/en-us/library/aa213275(sql.80).aspx



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-12 : 11:03:59
Too bad.
I manage and control a system at a client today with emails.

I set the header to the action to take, and datetime-based verification code in the body. I send this to a special account at client and the SQL Server response to this email.

Yikes. What to do now?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-02-12 : 11:14:38
how? with xp_process mail?



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-02-12 : 11:23:41
We also have SQL routines that "harvest" Emails from (in effect) a POP3 box.

But latterly we have been using a little VB APP that "listens" to the POP3 box, pulls any mew messages and then INSERTs them in the SQL table.

Dunno which is more efficient ... but the later is independent of xp_readmail.

Some handy stuff from EasyMail Objects if you need an easy replacement.

Kristen
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-12 : 11:24:43
xp_readmail.
And a lot of IF's for the subject line, such as "unlock" user account.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-02-12 : 11:26:24
i still think that a linked server isn't a bad idea... would have to play with that...




Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-12 : 11:28:51
Do the linked server approach limit the availability to Exchange server only?
Or are other mail management systems still valid?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-02-12 : 11:32:18
exchange is still fully available.
it's just a sql query against the exchange.
of course linked server querying best practices should be followed.
if you try to move 100.000 items from exchange to sql server it will die



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -