From: richard.townsendrose on
Rob

a) uses geoff's library - it works and the ftp is superb

b) METHOD SendMailSMTP(lAuth) CLASS EmailSend
LOCAL lOk:=FALSE
LOCAL oEmail AS CEmail
LOCAL oSmtp AS cSMTP
LOCAL n AS DWORD

oEmail := CEmail{} // empty email created
oEmail:Subject := SELF:cTitle
oEmail:cText := SELF:cMessage
oEmail:cDestList:= SELF:GetRecipList()
oEmail:cCCList := SELF:GetCCList()
oEmail:cBCCList := ""

oEmail:FromAddress := AllTrim(LookupName(SELF:cSenderRef, #EMAIL))
oEmail:FromName := AllTrim(LookupNameC(SELF:cSenderRef)) + ' of ' +
AllTrim(LookupNameX(SELF:cSenderRef))
oEmail:ReplyTo := AllTrim(LookupName(SELF:cSenderRef, #EMAIL))
oEmail:Cargo := "X-Mailer: TDOC SMTP Mailer"
IF ALen(SELF:aDocuments) > 0
FOR n:=1 TO ALen(SELF:aDocuments)
oEmail:EncodeAttachment(SELF:aDocuments[n])
NEXT
ENDIF
oEmail:EncodeEmail() // encode up the new "raw" part

oSmtp:=CSmtp{oEMail, SysObject():GetSet(SMTPSvr)}
oSmtp:SecureSMTP := lAuth
IF oSmtp:SecureSMTP
oSmtp:UserName := SysObject():GetSet(SMTPUserName)
oSmtp:PassWord := SysObject():GetSet(SMTPPassword)
ENDIF
lOk:= oSmtp:SendMail()
IF ! lOk
SELF:cReplyCode:=NTrim(oSmtp:ReplyCode)
SELF:cErrorNo:=NTrim(oSmtp:Error)
SELF:cErrorMsg:=oSmtp:ErrorMsg
ENDIF

// try and cleanup big strings
oEmail:cRaw := ""
CollectForced()

RETURN lOk

richard

From: Rob van Erk on
Richard,

Perfect!, thanks. Will have a look at Geoff's site to obtain some
downloads on this.

Brgds,
Rob

From: richard.townsendrose on
Rob

apparently it does not always work...

geff just told me that his smtp does not work when the remote smtp
server is working with secure sockets.

however in five years this is the first time we came across it. it is
british telecom in northern ireland.

see also http://www.marti.nl/cavo/ 's classes for mapi etc etc

and for novel's groupwise see
http://www.novell.com/coolsolutions/tools/13913.html

Richard