#119288 - 2004-05-10 06:21 PM
email with CDONTS
|
jechilt
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
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
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
CDONTS should also be covered in the FAQ Section too.
Kent
|
Top
|
|
|
|
#119291 - 2004-05-11 06:39 AM
Re: email with CDONTS
|
jechilt
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
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
|
|
|
|
#119294 - 2004-05-11 09:41 AM
Re: email with CDONTS
|
jechilt
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
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 202 anonymous users online.
|
|
|