Code: Select all
Hi to all!
How many attach files my I send in a single message?
For My tests I think the limit is 10
Many thanks
Marco
FUNCTION SPEDISCITO( cToEle, cFrom, cServer, cSubject, cMessage, cAttEle, cSender, cUser, cPassword )
LOCAL i
LOCAL oASpetta
LOCAL nRes := 0
LOCAL oMail
LOCAL aTo := {}
LOCAL aFile := {}
LOCAL nCc
FOR i := 1 TO mlcount( cToEle , 100 )
IF i = 1
nCc := 1
ELSE
nCc := 2
ENDIF
AADD( aTo , { sepstr( ALLTRIM( memoline(cToEle,100,i) ),";",1) , 2 } )
NEXT i
FOR i := 1 TO mlcount( cAttEle , 100 )
AADD( aFile , ALLTRIM( memoline( cAttEle , 100 , i )) )
NEXT i
IF FILE(ALLTRIM(cMessage))
cMessage := MEMOREAD(cMessage)
ENDIF
DEFINE MAIL oMail ;
SUBJECT cSubject ;
TEXT cMessage ;
FROM USER
FOR i := 1 TO LEN( aTo )
AADD( oMail:aRecipients, aTo[i] )
NEXT i
[b] IF LEN( aFile ) <> 0
oMail:aFiles := aFile
ENDIF[/b]
ACTIVATE MAIL oMail
RETURN nRes