Code is below, I am running into size limitations for my lcbody, does anyone have a way around this?
************************************************************
*!* Sample code using SendEmail procedure
DIMENSION aryAttach(1)
aryAttach(1) = "C:\an attached file i would like to send.txt"
lcFrom = "myemailaddress@whatever.com"
&&lcTo is inserted by another program and keeps looping this .prg until i used all my email address I am sending to
lcSubject = "blah blah blah........"
lcBody = "This is where I want my message but I'm running into size limitations, please help "
FOR lnCount = 1 TO 1
=SendEmail(lnCount, lcFrom, lcTo, lcSubject, lcBody, @aryAttach)
ENDFOR
PROCEDURE SendEmail(tcType, tcFrom, tcTo, tcSubject, tcBody, tcFiles)
LOCAL llEmailStatus, lcErrorHandlerWas, lcType
lcErrorHandlerWas = ON("ERROR")
lcType = ""
WAIT WINDOW " One Moment... Email is being generated and sent " NOWAIT
DO CASE
CASE tcType = 1
llEmailStatus = SendViaMAPI(tcFrom, tcTo, tcSubject, tcBody)
lcType = "MAPI"
ENDCASE
WAIT CLEAR
ENDPROC
FUNCTION SendViaMAPI(tcFrom, tcTo, tcSubject, tcBody)
ON ERROR RETURN(.F.)
LOCAL loSession, loMessages
loSession = CREATEOBJECT( "MSMAPI.MAPISession" )
loSession.Signon()
IF (loSession.SessionID > 0)
loMessages = CREATEOBJECT( "MSMAPI.MAPIMessages" )
loMessages.SessionID = loSession.SessionID
ENDIF
WITH loMessages
.Compose()
.RecipDisplayName = tcTo
.RecipType = 1
.ResolveName()
.MsgSubject = tcSubject
.MsgNoteText = tcBody
.SEND(.F.)
ENDWITH
loSession.Signoff()
STORE .NULL. to loSession, loMessages
RELEASE loSession, loMessages
RETURN .T.
ENDFUNC