Page 1 of 1 1
Topic Options
#39596 - 2003-04-28 05:42 PM send email
Night Hawk Offline
Fresh Scripter

Registered: 2002-10-09
Posts: 33
Loc: NC, USA
I guess what i am trying to do is sorta like this; i am logged on with a standard user account. I open a command window as the local workstation administrator to test and run my kix scripts and i would like to send and email to my self (my regular email) or someone else (there regular email) when it has completed or when whatever i am doing has updated. What do you all think? Is that possable?? and with a udf [Confused] [Confused]
Top
#39597 - 2003-04-28 05:56 PM Re: send email
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Please read the FAQ Forum, e.g. How do I send e-mail from KiXtart? (SMTP)
_________________________
There are two types of vessels, submarines and targets.

Top
#39598 - 2003-04-28 05:58 PM Re: send email
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
but you may just want to use Blat
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#39599 - 2003-04-28 06:26 PM Re: send email
Night Hawk Offline
Fresh Scripter

Registered: 2002-10-09
Posts: 33
Loc: NC, USA
external software is not allowed so that pretty much rules out postie and blat. I have tried com using cdo the email went to never never land and i tried the com using outlook the problem with that is you must have an email account to send a email (errors out), as my admin account does not have a email account hence the error otherwise it works fine. I tried the udf and again the same error with the admin account and it works fine in the regular acount. i don't remember tring com with win32admin i will try it again to see what happens. I am still open for suggestions [Big Grin]
Top
#39600 - 2003-04-28 06:35 PM Re: send email
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I thought you just said that no external software is allowed?
so how you can try that then?

your only solution will be without user account to somehow wrap telnet and send the data directly to smtp-servers smtp-port.

just like the other sendmail UDF does.
the problem with that is that there can't be any regular user messing up the process or it will fail.
thus, it's almost only usable for interactive scheduled tasks...
and for some other things, which are bad [Big Grin]
_________________________
!

download KiXnet

Top
#39601 - 2003-04-28 06:53 PM Re: send email
Night Hawk Offline
Fresh Scripter

Registered: 2002-10-09
Posts: 33
Loc: NC, USA
That is true but i am allowed to test to a certian extent asllong as i follow the rules. [Embarrassed]
Top
#39602 - 2003-04-28 07:16 PM Re: send email
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
eh?
in that case your best solution is once again blat!
_________________________
!

download KiXnet

Top
#39603 - 2003-04-28 07:22 PM Re: send email
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
So, which of the solutions in the FAQ are not working for you? I see at least one solution that should be working.
_________________________
There are two types of vessels, submarines and targets.

Top
#39604 - 2003-04-28 08:04 PM Re: send email
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well...
I must wonder what the rules are.

I see 3 different possible solutions.
it totally depends on the rules.
_________________________
!

download KiXnet

Top
#39605 - 2003-04-29 07:54 AM Re: send email
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Night Hawk,

I think the COM method is the best method for you to use. Don't forget to check the other link shown in that FAQ

http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=13;t=000007

I'll recheck at work, but I think you can send email with any account you put in your script. It is not dependent on the Outlook Profile as I remember it. But can't confirm right now from home.

Top
#39606 - 2003-04-29 11:28 AM Re: send email
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
doc [Confused]

you seem to be so not reading the post.
it is clearly pointed out that OUTLOOK and CDO are the 2 methods that will not work, even we wish them to.
_________________________
!

download KiXnet

Top
#39607 - 2003-04-29 03:35 PM Re: send email
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Howeve,r he neve specified wheter he used one of the canned UDFs or whether he wrote his own functions. That's why I want to know which of the proposed canned UDFs did not work for him. It's well possible that his own CDO-script had bugs in it which rendered it unfunctional.
_________________________
There are two types of vessels, submarines and targets.

Top
#39608 - 2003-04-29 04:10 PM Re: send email
Night Hawk Offline
Fresh Scripter

Registered: 2002-10-09
Posts: 33
Loc: NC, USA
Sorry for taking so long to get back to you all, but here we go i will try to answer the questions and comments.
NT/XP/2k/outlook 2k enviorment:
Blat is not authorized. external software
POSTIE is not authorized. external software
COM - Howard Bullock's Win32Admin.DLL This is a dll and in the Gray area (my favorite place).
COM (using Outlook) this worked with my regular login account but not with the local admin account that i have which does not have a corresponding email account.
I tried this with the canned udf and recieved an error due to no email account.
COM - Using CDO (Collaborative Data Objects): tried this one an recieved no error or any thing.
I did use the canned udfs only changed the email address and remebering the @@ requirement.
I still wonder where the Com using cdo went as the test script completed with no errors but i did not recieve the email nor do i know where it went. [Confused]
Please bear with if i make a few posting mistakes as i have to quit and come back several times and i for get where iam (getting old)(work calls you now)
here is some of what i used
code
*************************************************
break on
$Root = CreateObject("Outlook.Application")
$MailItem = $Root.CreateItem(0)
$MailItem.Importance = 1
; - 2 high importance
; - 1 normal importance
; - 0 low importance
$MailItem.Subject = "Automation Test"
$MailItem.To = "me@@mymail.com"
$MailItem.Body = "Test info"
IF EXIST("C:\errorlog.txt")
$MailItem.Attachments.Add("C:\test\errorlog.txt")
ENDIF
$MailItem.Send$Root = 0
*************************************************
end code
and here is the other one that just did not give me any thing
code
*************************************************
break ON
$= SetOption("WrapAtEol","On")
break on
$objCDO = CreateObject("CDONTS.NewMail")
IF @error <> 0
?@error " CDO not found"
SLEEP 2
EXIT 1
ENDIF
$objCDO.From = "me@@mymail.com"
$objCDO.To = "me@@mymail.com"
$objCDO.Subject = "Software Notification for PC"
$objCDO.Body = "More Testing"
$objCDO.BodyFormat = 0
$objCDO.MailFormat = 0
$objCDO.Send
$objCDO = 0

*************************************************
end code
I hope i answered all let me know if i missed anything
Thanks [Embarrassed]

Top
#39609 - 2003-04-29 04:23 PM Re: send email
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
don't tell the ppl that you use blat [Wink]

hide it in somewhere and call it with some own-made UDF [Big Grin]
_________________________
!

download KiXnet

Top
#39610 - 2003-04-29 08:51 PM Re: send email
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Lonkero, I guess I must be blind as I did not see where it was CLEARLY pointed out that those methods would not work.

For one, I disagree, they will work. However, yes you do have to have and use a Profile for Outlook. Probably NOT what he wants, but does not mean it won't work either.

SMTP via blat or other would probably be more what he is looking for, but he could also just log to a directory and have his own system retrieve and manage those logs if he really wanted to do it without external programs.

Top
#39611 - 2003-04-29 11:35 PM Re: send email
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
no...
ofcourse you can make cows fly.

go ahead.
but if you are suggesting that doing so is same as working...
no, it's weirdness.
as there is lot easier way to do that

outlook object won't work as he said, he would be using local-sys account.
thus he would need more than lot of tweaking to make it work.
and make it work on all workstations he wants to run the code on.
regardless of the office version being installed.

[ 29. April 2003, 23:45: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#39612 - 2003-04-29 11:39 PM Re: send email
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
The vote should be then for cdo in this example.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#39613 - 2003-04-29 11:57 PM Re: send email
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
now that can't be.

he said that it does not work.

as a matter of fact, it has never worked for me either.

so, would not trust a method that does nothing [Wink]
what you think?
_________________________
!

download KiXnet

Top
#39614 - 2003-04-29 11:59 PM Re: send email
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
No.. If we can find a way to make this work..

Send Email Report Detailing Disk Usage

Transmission Of Email Via Smtp Without The Need For An External Smtp Application

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#39615 - 2003-04-30 12:03 AM Re: send email
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, the latter at least says:
quote:
You will not be able to use this code on any IIS server older then 5 IIS 5 installs with Win2K.

for Sending E-Mail on IIS 4 you will have to use CDNOTS.NewMail However I have not found a way to change the SMTP server that it uses. You must use SMTP that installs with IIS.

_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.053 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org