Hi Itamar,

As I am migrating from xHarbour, I am using the example below and going very
well with Blat. even faster than before hb_sendmail ()

#ifndef __XHARBOUR__
   #include "hbblat.ch"

   FUNCTION SendMail( cServer, nPort , ccFrom, aTo, aCC, aBCC, ccBody,
cSubject, aFiles, cUser, cPass, cPopServer, nPriority, lRead, lTrace,
lPopAuth, lNoAuth, nTimeOut, cReplyTo )
   LOCAL nRet
   LOCAL oBlat := HBBlat():New()
   WITH OBJECT oBlat
      :cFrom                   := ccFrom
      :cTo                     := aTo[1]
      :cUserAUTH               := cUser
      :cPasswordAUTH           := cPass
      :cHostname               := WUSUARIO
      if aCC#Nil
        :cCC                   := aCC[1]   // com copia
      endif
      //:cBCC                  := aBCC[1]  // com copia oculta
      :cServerSMTP             := cServer  // servidor SMTP
      :nPortSMTP               := nPort    // porta do servidor SMTP
      :cSubject                := cSubject // asunto da mensagem
      :cBody                   := ccBody   // corpo da mensagem
      //:lRequestDisposition     := TRUE   // confirmação de leitura
      //:lRequestReturnReceipt   := TRUE   //
      :aAttachBinFiles         := aFiles   // arquivos anexos
      //:cLogFile              := "a.txt"  // habilita um LOG
      //:lDebug                := TRUE     // habilita o debug
      //:lLogOverwrite         := TRUE     // quando o LOG é usado deve
sobre-escrever no arquivo LOG
   END
   nRet := oBlat:Send()
   if nRet # 0
      MsgStop("Ocorreu o seguinte Erro ao tenta enviar e-mail: " +
HB_OsNewLine() + ;
               oBlat:BlatErrorString() ,"Avido do Sistema")
   endif
   Return(IIF( nRet == 0,.T.,.F.))
#else
   FUNCTION SendMail( cServer, nPort , cFrom, aTo, aCC, aBCC, cBody,
cSubject, aFiles, cUser, cPass, cPopServer, nPriority, lRead, lTrace,
lPopAuth, lNoAuth, nTimeOut, cReplyTo )
   Return(HB_SendMail(cServer, nPort , cFrom, aTo, aCC,aBCC , cBody,
cSubject, aFiles, cUser, cPass, cPopServer, nPriority, lRead, lTrace,
lPopAuth, lNoAuth, nTimeOut, cReplyTo ))
#endif
***END CODE

Leonardo Machado


Itamar Lins wrote:
> 
> Hi!
> No possible use with bcc 5.5
> 
> Unresolved external _cSend referenced  from 
> D:\DEV\HARBOUR\LIB\HBBLAT.LIB|blatwrp
> 
> TIA,
> Itamar M. Lins Jr. 
> 
> 
> 
> _______________________________________________
> Harbour mailing list
> Harbour@harbour-project.org
> http://lists.harbour-project.org/mailman/listinfo/harbour
> 
> 

-- 
View this message in context: 
http://www.nabble.com/contrib-blat-Fail-tp23385817p23387741.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to