| Author |
Topic |
|
jackstow
Posting Yak Master
160 Posts |
Posted - 2002-01-03 : 16:30:39
|
| Happy New Year everyone. While eating the tradition Christmas Day nut roast I was pondering about updating a website. Wouldn't it be nice if, rather than having to log into a content management system and fill in a form to update a site, you could just fire off an email to the SQL Server that runs the site with the update in the body text. So I'd like to do an insert by email, just not sure how, or if, this would be possible... Any ideas anyone?CheersJack Stow |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-01-03 : 16:56:27
|
| In looking at sp_processmail in Books Online, it doesn't seem like it will do the trick for you. Take a look anyway, you might be able to tweak it. I don't think it will process an email correctly unless you write a stored procedure to accept the body or subject line as a parameter.Search SQL Team for "email" or "send mail" and check out Merkin's articles in particular. This kind of stuff is better handled through an email COM process rather than SQL Mail, IMHO. |
 |
|
|
ToddV
Posting Yak Master
218 Posts |
Posted - 2002-01-03 : 17:12:46
|
| I can not speak for what would be best ( and I have a feeling that robvolk is right on this one), but it would not be to difficult to right a procedure using xp_readmail et al to do this. You could then schedule it to run at appropriate intervals. |
 |
|
|
jackstow
Posting Yak Master
160 Posts |
Posted - 2002-01-04 : 04:25:58
|
| OK. I wasn't thinking of using SQL Mail though as I handle mails sent from SQL Server with a table that fires a trigger on insert that uses CDONTS - SQL Mail always seemed a big server overhead - so what I was thinking of was basically this email table in reverse.. |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2002-01-04 : 22:43:18
|
| Hi thereI vaugely remember seeing an article about this ages ago, but can't seem to find it now.I like your idea though, here is how I would go about it.1. Go get Jmail from http://tech.dimac.net/ Jmail is a great mail component that does POP3, so it will recieve mail for you.2. Set up a mail box for your content management.3. Write some vbscript that will use the component to check the mailbox, parse out the mail and insert the content into your table.4. Run this script as a scheduled task, due to SQL servers flaky handling of long scripts you may need to run it as a DTS step. Run it every 10 minutes or so, polling the mailbox for new content, make sure it exits nicely if there is nothing for it to do.Hope that helps....Damian |
 |
|
|
KnooKie
Aged Yak Warrior
623 Posts |
Posted - 2002-01-05 : 05:48:20
|
| Have you thought about using the windows MAPI interface for this. We used it when SQL Server 6.5 was out as it didn't support bi-directional replication, so our subscribers, unbeknown to them sent emails to a piece of software at the publisher which actually committed their changes to the database. We were using VB6 as the front-end though so it wasn't a web product.May be of some help though ? |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2002-01-05 : 06:05:02
|
ooooooooo nastyI bet that was fun to debug Damian |
 |
|
|
jackstow
Posting Yak Master
160 Posts |
Posted - 2002-01-05 : 15:42:40
|
I like the JMail idea - MAPI will mean installing Outlook/Exchange won't it? And the whole SQL Mail overhead thing again.. I'm getting into .NET Framework as well just now so I'm sure there will be some features of VB.NET that will help with developing an idea like this. Any .NET junkies out there? Jack |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-01-05 : 16:42:48
|
| Not a junkie myself, but 4Guys has this: http://aspnet.4guysfromrolla.com/And if you want to spend the money: http://www.asptoday.com/I have a love/hate relationship with ASPToday. Their articles have been so poor since they started charging, and they are ENSLAVED to XML and .Net, but man, when they do have a good article, it's goooooooooood! I know I've seen email done with .Net on their site, (they just had an article about 3 days ago), but you can't get to it unless you subscribe.Edited by - robvolk on 01/05/2002 16:44:00 |
 |
|
|
jackstow
Posting Yak Master
160 Posts |
Posted - 2002-01-05 : 16:51:32
|
| It's a tough one - spend my last few quid before pay day on a crate of beer or an ASPToday subscription ... |
 |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2002-01-05 : 22:29:28
|
Jack, go for the . The ASPToday subscription can come later. By the way, I know this will be a real shocker, but I'm in complete agreement with Rob on his analysis of ASPToday . About 1 year ago it was totally free. About 9 months ago it was $45 or so for a membership, and the Today's and Yesterday's articles were still free. Then it went up to $99 for a membership in the middle of last year, and not long ago, not even the Today or Yesterday articles are free. They toss out a freebie about once per month. Many of their articles and tips leave much to be desired, but now and then you hit a really good one. I'm torn as to whether I will renew my subscription. I suspect that there are other very good, free, resources out there like 4Guys.--------------------------------------------------------------1000 Posts, Here I come! I wonder what my new title will be... |
 |
|
|
|