Jump to content
Fivewin Brasil

Cópia oculta com TOleAuto():New("Outlook.Application")


jfaguiar

Recommended Posts

Boa tarde amigos. 

Tenho essa função nos meus sistemas e gostaria de saber se tem algum parâmetro para cópia oculta.

Obrigado

function Mmail(cTo,cSentBy,cEmailHeader,cEmailNotes,cANEXO1)

// Modificada por João Freire de Aguiar
DEFAULT lEXIBE := .F.
oOutLook := TOleAuto():New("Outlook.Application")
oMailItem := oOutLook:Invoke("CreateItem", 0)
oMailitem:to:=cTo
// oMailItem:Recipients:Add( "tdsperth@outlook.com" )
oMailitem:CC:= cSentBy
oMailItem:Subject := cEmailHeader
oMailItem:Body := cEmailNotes
if ! empty(cANEXO1)
   IF VALTYPE(cANEXO1) == "C"
      oMailItem:Attachments:Add(cANEXO1)
   ELSEIF VALTYPE(cANEXO1) == "A"
      FOR _i := 1 TO LEN(cANEXO1)
          oMailItem:Attachments:Add(  cANEXO1[_i]  )
      NEXT
   ENDIF
endif
oMailItem:display(.T.)
RETURN(nil)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...