Page 1 of 1 1
Topic Options
#119288 - 2004-05-10 06:21 PM email with CDONTS
jechilt Offline
Starting to like KiXtart

Registered: 2000-12-01
Posts: 102
Loc: Denver Colorado
Greetings,

I have been trying to get my CDONTS script to work and am having some difficulty.

This is what my script says:
Code:
 
$= SetOption("WrapOnEol","On")

$cmail = CreateObject("CDONTS.NewMail")
If @error = 0
$cmail.To = "xyz@@mycompany.com"
$cmail.From = @userid+"@mycompany.com"
$cmail.Subject = "Client Problem: "+@wksta
$cmail.Body = @wksta+@crlf+@userid+@crlf+@fullname
$cmail.Send $cmail = 0
EndIf



This code was taken from thread CDONT Thread

It appears to be working with no errors, but no email. I am not sure how to troubleshoot this any further. Any suggestion would be great
_________________________
John
LM Contractor
One of the 2 dads

Top
#119289 - 2004-05-10 06:50 PM Re: email with CDONTS
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Maybe this...

Code:
$= SetOption("WrapOnEol","On")

$cmail = CreateObject("CDONTS.NewMail")
If @error = 0
$cmail.To = "xyz@@mycompany.com"
$cmail.From = @userid+"@@mycompany.com"
$cmail.Subject = "Client Problem: "+@wksta
$cmail.Body = @wksta+@crlf+@userid+@crlf+@fullname
$cmail.Send
$cmail = 0
EndIf



You doubled the @'s in the TO field but you forgot to in the FROM field.

Top
#119290 - 2004-05-10 07:28 PM Re: email with CDONTS
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
CDONTS should also be covered in the FAQ Section too.

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

Top
#119291 - 2004-05-11 06:39 AM Re: email with CDONTS
jechilt Offline
Starting to like KiXtart

Registered: 2000-12-01
Posts: 102
Loc: Denver Colorado
Quote:

+"@@mycompany.com"




you sure about that???
the proper syntax is being used.
_________________________
John
LM Contractor
One of the 2 dads

Top
#119292 - 2004-05-11 06:51 AM Re: email with CDONTS
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
@'s are considered special chars in kix since they are used by built in macros. They have to be doubled up in strings. From the manual......

Quote:

Note: The characters @, %, or $ are normally used to indicate macros, environment strings, or variables. If you want to use these characters in a string, use @@, %%, or $$.





So @userid+"@@mycompany.com" would be interpreted by kix as sptomey@company.com for me.

Top
#119293 - 2004-05-11 08:07 AM Re: email with CDONTS
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
citrixboy is right, the proper syntax was not used.
_________________________
!

download KiXnet

Top
#119294 - 2004-05-11 09:41 AM Re: email with CDONTS
jechilt Offline
Starting to like KiXtart

Registered: 2000-12-01
Posts: 102
Loc: Denver Colorado
thanks all for the replies.

after fighting with cdonts, I wimped out and went with the smtp method and it is working fine.
working on reading a file now...
sorry to have bothered the forum
_________________________
John
LM Contractor
One of the 2 dads

Top
#119295 - 2004-05-11 09:45 AM Re: email with CDONTS
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
bothering is never a bad thing here...
some other things are

but, glad you got that solved/worked around.
_________________________
!

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
0 registered and 202 anonymous users online.
Newest Members
BeeEm, min_seow, Audio, Hoschi, Comet
17882 Registered Users

Generated in 0.059 seconds in which 0.025 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