#39596 - 2003-04-28 05:42 PM
send email
|
Night Hawk
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
|
|
Top
|
|
|
|
#39598 - 2003-04-28 05:58 PM
Re: send email
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
but you may just want to use Blat
|
|
Top
|
|
|
|
#39599 - 2003-04-28 06:26 PM
Re: send email
|
Night Hawk
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
|
|
Top
|
|
|
|
#39601 - 2003-04-28 06:53 PM
Re: send email
|
Night Hawk
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.
|
|
Top
|
|
|
|
#39605 - 2003-04-29 07:54 AM
Re: send email
|
NTDOC
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
|
|
|
|
#39608 - 2003-04-29 04:10 PM
Re: send email
|
Night Hawk
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. 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
|
|
Top
|
|
|
|
#39612 - 2003-04-29 11:39 PM
Re: send email
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
The vote should be then for cdo in this example.
Kent
|
|
Top
|
|
|
|
#39614 - 2003-04-29 11:59 PM
Re: send email
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1198 anonymous users online.
|
|
|