Link to home
Start Free TrialLog in
Avatar of mixa
mixa

asked on

Using ActiveX from TSQL script

Hello all,

I want to process email messages from scheduled Transact SQL script. I tried to use xp_sendmail /xp_readmail standard routines, and they seem to be working (sometimes :).

The problem is that I need to access at least to header information of the message, and save it to file. xp_readmail doesn't support that.

I found several ActiveX controls that have this functionality, but I don't know the best way to access to ActiveX from TSQL script, and haven't found any information in docs. So I see next ways:

1. using 3rd party xp_... routines. I haven't found any, except http://www.spudsoft.demon.co.uk/code/index.html but it is for sending (SMTP), and I'd rather prefer to deal with commercial software

2. using xp_cmdshell troutine to external .exe file that extracts data from POP3/IMAP boxes, then import data to DB

3. write external routine (ie windows service) that listens to mailbox itself and writes data to DB via something like OLE DB.

But if I could use ActiveX directly from TSQL, it would be the best. Can anybody suggest anything else ?

PS: I reviewed http://www.mssqlserver.com/faq/sqlmail-woexchange.asp, so refering me to that is not necessary :)

<MIXA />
ASKER CERTIFIED SOLUTION
Avatar of simonsabin
simonsabin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mixa
mixa

ASKER

Cool! this is just I need.

Please post an answer and I give you the points.

Thanks,
<MIXA />
Avatar of mixa

ASKER

I've found the button to 'accept comment as the answer' :)
You don't need to do that any more just click on accept comment as answer.