Jump to content
Fivewin Brasil

TOleAuto():New("Outlook.Application")


jfaguiar

Recommended Posts

Bom dia caríssimos.

Costumo utilizar essa classe para enviar e-mail pelo outlook e gostaria de saber se ela possui o método cópia oculta.

Para maior clareza, segue a minha function:

Obrigado

 

function Mmail(cTo,cSentBy,cEmailHeader,cEmailNotes,cANEXO1,cToCco) 
oOutLook := TOleAuto():New("Outlook.Application")
oMailItem := oOutLook:Invoke("CreateItem", 0)
oMailitem:to:=cTo
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

 

Bom dia caríssimos.

Costumo utilizar essa classe para enviar e-mail pelo outlook e gostaria de saber se ela possui o método cópia oculta.

Para maior clareza, segue a minha function:

Obrigado

 

function Mmail(cTo,cSentBy,cEmailHeader,cEmailNotes,cANEXO1,cToCco) 
oOutLook := TOleAuto():New("Outlook.Application")
oMailItem := oOutLook:Invoke("CreateItem", 0)
oMailitem:to:=cTo
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)

 

// Copia Oculta
         oMail:BCC := AllTrim(Setup->EmailUser)

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...