Re: email notification of new file arrival

Tech-Archive recommends: Fix windows errors by optimizing your registry



turns out, with some tweaking to the VB script, I'm able to get this working.
We're almost there though....the file name changes each day after the job
completes before 11am. How do I get this to pick off only that file? By
modified date? I'm sure theres something that can additionally be tweaked in
the VBS.....

Thoughts?

"Helmut Obertanner" wrote:

> Hello SQLcat,
>
> can you try if your smtp host is reachable from the computer where you run
> the script ?
> open a command promt
> type:
> telnet ip.of.smtp.server 25
>
> did you get an answer saying helo .....
>
> is the sender (from) address is correct ?
> some mailservers block not valid email addresses
>
> --
> Freundliche Grüße / with regards
>
> Helmut Obertanner
> Technical Consultant
>
> Softwaredevelopment
> DATALOG Software AG | Zschokkestr. 36 | D-80687 Munich
> web: www.datalog.de
>
>
> .... and IT works!
>
> "SQLcat" <SQLcat@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
> news:488BC34A-7A4F-4E9B-9812-7423C7236A86@xxxxxxxxxxxxxxxx
> > I've tried both IP and UNC of our mail server for SmartHost.....no go yet.
> >
> > "Helmut Obertanner" wrote:
> >
> >> No, if you use a smarthost like in the script i posted.
> >> The SMTP Server should be a server in your company, ask your
> >> Administrator
> >> wich server you can use.
> >> Normally it's your Exchangeserver.
> >>
> >> --
> >> Freundliche Grüße / with regards
> >>
> >> Helmut Obertanner
> >> Technical Consultant
> >>
> >> Softwaredevelopment
> >> DATALOG Software AG | Zschokkestr. 36 | D-80687 Munich
> >> web: www.datalog.de
> >>
> >>
> >> .... and IT works!
> >>
> >> "SQLcat" <SQLcat@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
> >> news:D67C6701-5CBC-4E61-96D1-6DE77C5B1091@xxxxxxxxxxxxxxxx
> >> > do I need smtp installed on the machine from where I'm retrieving the
> >> > file?
> >> >
> >> > "Helmut Obertanner" wrote:
> >> >
> >> >> Hell SQLcat.
> >> >>
> >> >> here is a sample script, that sends a file "test.doc" from a directory
> >> >> "dir1"
> >> >> Why not try it - it's free and does the job.
> >> >>
> >> >> you must change the
> >> >> smarthost (should be your internal emailserver)
> >> >> emailadresses (from, to)
> >> >> directoryname
> >> >> filename
> >> >>
> >> >> You can't write scripts / no problem - many people can, i too :-)
> >> >>
> >> >> ------------ save this as email.vbs ----------------------------
> >> >>
> >> >> Dim iMsg
> >> >> Dim iConf
> >> >> Dim Flds
> >> >> Dim strHTML
> >> >> Dim strSmartHost
> >> >>
> >> >> Const cdoSendUsingPort = 2
> >> >> StrSmartHost = "10.11.0.18"
> >> >>
> >> >> set iMsg = CreateObject("CDO.Message")
> >> >> set iConf = CreateObject("CDO.Configuration")
> >> >>
> >> >> Set Flds = iConf.Fields
> >> >>
> >> >> ' set the CDOSYS configuration fields to use port 25 on the SMTP
> >> >> server
> >> >>
> >> >> With Flds
> >> >> ..Item("http://schemas.microsoft.com/cdo/configuration/sendusing";) =
> >> >> cdoSendUsingPort
> >> >> ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver";) =
> >> >> strSmartHost
> >> >> ..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout";)
> >> >> = 10
> >> >> ..Update
> >> >> End With
> >> >>
> >> >> ' build HTML for message body
> >> >> strHTML = "<HTML>"
> >> >> strHTML = strHTML & "<HEAD>"
> >> >> strHTML = strHTML & "<BODY>"
> >> >> strHTML = strHTML & "<b> This is the test HTML message body</b></br>"
> >> >> strHTML = strHTML & "</BODY>"
> >> >> strHTML = strHTML & "</HTML>"
> >> >>
> >> >> ' apply the settings to the message
> >> >> With iMsg
> >> >> Set .Configuration = iConf
> >> >> ..To = "youraddress@xxxxxxxxxxxxxx"
> >> >> ..From = "oracle@xxxxxxxxxxxxxx"
> >> >> ..Subject = "Here is your File test.doc from directory c:\dir1 (Sent
> >> >> via
> >> >> Port
> >> >> 25 on Server 10.11.0.18)"
> >> >> ..HTMLBody = strHTML
> >> >>
> >> >> ..AddAttachment "file://c:\dir1\test.doc"
> >> >>
> >> >> ..Send
> >> >> End With
> >> >>
> >> >> ' cleanup of variables
> >> >> Set iMsg = Nothing
> >> >> Set iConf = Nothing
> >> >> Set Flds = Nothing
> >> >>
> >> >> -------------------------------------------------------------------------
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Freundliche Grüße / with regards
> >> >>
> >> >> Helmut Obertanner
> >> >> Technical Consultant
> >> >>
> >> >> Softwaredevelopment
> >> >> DATALOG Software AG | Zschokkestr. 36 | D-80687 Munich
> >> >> web: www.datalog.de
> >> >>
> >> >>
> >> >> .... and IT works!
> >> >>
> >> >> "SQLcat" <SQLcat@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
> >> >> news:C3979383-2E12-4A3E-B0AD-4B580EA9CB9A@xxxxxxxxxxxxxxxx
> >> >> > The emailfile is laid out in its own directory around 10:30am each
> >> >> > day.
> >> >> > I
> >> >> > don't know how to effectively code a VBS that will send me the
> >> >> > notification.
> >> >> > Honestly, I just want to do what "youve got files" already does as
> >> >> > outlined
> >> >> > via the link provided.
> >> >> >
> >> >> > I'm sure this can be done, but don't know how to on my own.
> >> >> >
> >> >> > "Helmut Obertanner" wrote:
> >> >> >
> >> >> >> Hello, if you have a SMTP Service on your Windows-machine running,
> >> >> >> you
> >> >> >> could
> >> >> >> save emailfile to pickupfolder, or you can use a script that sends
> >> >> >> the
> >> >> >> message with cdo.
> >> >> >>
> >> >> >> can you trigger a vbs-script after running your import ?
> >> >> >> --
> >> >> >> Freundliche Grüße / with regards
> >> >> >>
> >> >> >> Helmut Obertanner
> >> >> >> Technical Consultant
> >> >> >>
> >> >> >> Softwaredevelopment
> >> >> >> DATALOG Software AG | Zschokkestr. 36 | D-80687 Munich
> >> >> >> web: www.datalog.de
> >> >> >>
> >> >> >>
> >> >> >> .... and IT works!
> >> >> >>
> >> >> >> "SQLcat" <SQLcat@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
> >> >> >> news:6F5EA82A-D201-45CE-B98F-B8C962437448@xxxxxxxxxxxxxxxx
> >> >> >> >I currently have a job that populates an Oracle db and once
> >> >> >> >finished,
> >> >> >> >it
> >> >> >> >lays
> >> >> >> > a 1kb text file with its results in a directory. I'd like to
> >> >> >> > have
> >> >> >> > this
> >> >> >> > file
> >> >> >> > emailed to me once the job completes. I see there is a product
> >> >> >> > http://www.youvegotfiles.com/ that does the trick but I want to
> >> >> >> > accomplish
> >> >> >> > this without paying a price for someone elses product.
> >> >> >> >
> >> >> >> > Any thoughts/suggestions on how to programmatically automate this
> >> >> >> > task?
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
.



Relevant Pages

  • Re: email notification of new file arrival
    ... "Helmut Obertanner" wrote: ... > here is an article how to send email from a script. ... >> The emailfile is laid out in its own directory around 10:30am each day. ... >>> Softwaredevelopment ...
    (microsoft.public.office.developer.automation)
  • Re: email notification of new file arrival
    ... can you try if your smtp host is reachable from the computer where you run ... Softwaredevelopment ... > I've tried both IP and UNC of our mail server for SmartHost.....no go yet. ... if you use a smarthost like in the script i posted. ...
    (microsoft.public.office.developer.automation)
  • Re: Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script ... # have to place corresponding `LoadModule' lines at this location so the ...
    (perl.beginners)
  • Re: Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script Runs perfectly fine from the command prompt. ... # This is the main Apache HTTP server configuration file. ... LoadModule actions_module modules/mod_actions.so ...
    (perl.beginners)
  • Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script ... # have to place corresponding `LoadModule' lines at this location so the ...
    (perl.beginners)