Page 2 of 2 <12
Topic Options
#96747 - 2002-12-06 09:59 PM Re: something for the FAQ forum
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Kent, the original code works for me in our exchange environment. What doesn't work for you? What error do you see?

The new code you posted based on modSendMail seems to be overly complicated.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#96748 - 2002-12-06 10:23 PM Re: something for the FAQ forum
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Howard,

I get the following:

quote:

Script error: unknown or unexpected command [my]!
my $objCDO = Win32::OLE->CreateObject("CDONTS.NewMail");

I removed the my

quote:

Script error: Error in expression.!

If I change it to:
code:
$objCDO = CreateObject("CDONTS.NewMail");
IF @error <> 0 ?@error " CDONTS not found" SLEEP 2 EXIT ENDIF

It returns:
-2147221005 CDONTS not found

Thanks,

Kent

[ 06. December 2002, 22:26: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#96749 - 2002-12-06 11:39 PM Re: something for the FAQ forum
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
as I see it, nts needs install
_________________________
!

download KiXnet

Top
#96750 - 2002-12-06 11:41 PM Re: something for the FAQ forum
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
This started out as a Perl script. Hence the "my" and trailing semi-colon.

The code below works for me. If you do not have CDO installed, see the link in my post above to find out how to get CDO installed.

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 = "habullock@@comcast.net"
$objCDO.To = "hbullock@@tycoelectronics.com"
$objCDO.Subject = "Software Notification for PC"
$objCDO.Body = "More Testing"
$objCDO.BodyFormat = 0
$objCDO.MailFormat = 0
$objCDO.Send
$objCDO = 0

_________________________
Home page: http://www.kixhelp.com/hb/

Top
#96751 - 2002-12-07 12:47 AM Re: something for the FAQ forum
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Done..

Added in code.

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

Top
#96752 - 2002-12-07 03:07 AM Re: something for the FAQ forum
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
In case you didn't notice the supplied code generates HTML email. I haven't yet explored all the possibilities.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#96753 - 2002-12-07 01:15 PM Re: something for the FAQ forum
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
kent, have one correction for your link.
it actually does not need access via telnet.

it's the most open way to get mail sent.
it uses exactly the same methods as normal mail-servers use when they send mail between each other.
_________________________
!

download KiXnet

Top
#96754 - 2002-12-08 03:55 AM Re: something for the FAQ forum
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Corrected..

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

Top
Page 2 of 2 <12


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

Who's Online
0 registered and 1046 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.057 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

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