Login  
Search All Forums
Dart Home | PowerTCP Mail for ActiveX | Custom Development Reply | PowerTCP Mail for ActiveX Topics | Forums   
AuthorForum: PowerTCP Mail for ActiveX
Topic: smtp  object.message.to.add
loantec
pbaize@loantec-software.com

From: Kerrville, TX USA
Posts: 5
Member Since: 01/29/09
posted March 30, 2016 9:56 AM

Adds an email address ok and sends.  I can't figure out how to clear the "message.to". So that I can enter a new "single" address.
Every time I run it, and enter a new address, the old addresses are still there. So after 3 runs. the 3rd email has the first and second address in it as well as new address.

EX to = number1@email.com, number2@email.com, number3@email.com


test code snippet: 
WITH THISFORM.oleEmail.message
.to = ""
&& (NEEDS TO CLEAR OUT CURRENT EMAIL ADDRESS BEFORE ADDING NEW ADDRESS)
.to.add(ALLTRIM(THISFORM.fcTo))

.from = ALLTRIM(THISFORM.fcFrom)

*.subject = "Test Message"
.subject = ALLTRIM(THISFORM.fcSubject)

*.text = "all text in message goes here"
.text = ALLTRIM(THISFORM.fcText)

ENDWITH

WITH THISFORM.oleEmail
.login(ALLTRIM(THISFORM.fcServer), ALLTRIM(THISFORM.fcPort),;
ALLTRIM(THISFORM.fcUserName), ALLTRIM(THISFORM.fcPassWord))
.send()
.logout()
ENDWITH


Jamie Powell (Admin)

From: Rome, NY USA
Posts: 448
Member Since: 03/13/07

Extra Support Options
Custom Application Development

posted March 31, 2016 1:17 PM

Hello,
The To property is a DartStrings object; use .Clear() to clear out the collection.

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

Reply | PowerTCP Mail for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX