Re: Receiving email into pl/sql
Date: Wed, 07 Nov 2007 23:39:00 -0500
Message-ID: <fgu3sr$s28$1_at_reader1.panix.com>
DA Morgan wrote:
> Lee wrote:
>
[Quoted] >> I've sent email from pl/sql with utl_smtp and with 10g's utl_mail; but >> now I want to do the inverse, i.e. I want to READ email from pl/sql. >> >> The idea is to set up a dedicated email account. Users could send >> stereotyped messages to that account, and the pl/sql routine would >> read the mail, parse the messages and do the needful. >> >> As far as I can tell, utl_mail will send, but not receive email. >> >> I can think of some Rube Golberg workarounds but can anyone point the >> way to a "no fuss" way to read simple text emails? >> >> >> Thanks in advance
>
>
> If you think it is a good idea to send emails, across the web, from
> some Microsoft Outlook client directly into an Oracle database I am sure
> we can recommend a good 12 step program for you.
>
As you yourself point out, the email winds up as data somwhere; so why [Quoted] [Quoted] would it be worse to send email to an automated agent than sending email [Quoted] to a human agent or just reading an input file as data?
[Quoted] [Quoted] Why would reading email to drive a script from inside a stored procedure [Quoted] be more dangerous than running a static batch script or a script that takes input from a human or from a data file?
[Quoted] [Quoted] I assume you're concerned about sql injection attacks or maybe some sort [Quoted] of spam and/or spoofing, or even an attempt to "flood" the system a la DDOS attacks?
[Quoted] [Quoted] Maybe I'm not being sufficiently imaginative or paranoid, but I cant see [Quoted] how the sort of scheme I'm thinking of is more dangerous than crossing [Quoted] the street. Everybody and his uncle has a listserv that runs on commands sent in by email, so why is that setting off alarm bells?
[Quoted] [Quoted] I can use an http callout to get data from anywhere on the planet. There [Quoted] are "rest"-full web services, and SOAP interfaces and all sorts of ways [Quoted] to have all kinds of heaven-knows-what get presented as input. A routine that parses stereotyped email messages and deliveres canned reports in response seems pretty benign.
Or am I living in a fools paradise?
> Incoming emails are stored somewhere. Find the location. Read them using
> anything from UTL_FILE to whatever.
My Oracle server is running on a different box from my email server, so
the trick is to get the data from the mail server to the oracle box.
[Quoted] [Quoted] If I dont mind having more moving parts, there are plenty of ways to get [Quoted] from there to here; but I was hoping for something with "no fuss, no muss and no bother". Reading email seemed to fill the bill until I realize that I dont seem to have a slick way to make that happen.
Maybe something in Java running in the database?
[Quoted] [Quoted] Of course there is that proverb about the relative velocity of fools and [Quoted] fearful angels, so tell me more about why I could be stepping off a cliff here. Received on Thu Nov 08 2007 - 05:39:00 CET