Amigos, estou utilizando a função para enviar anexo pelo OutLook:

function TfrEnvio.EnviarEMail(const De, Para, COculta, Assunto, 
Texto, Arquivo: string;
Confirma: Boolean): Integer;
var
   Msg: TMapiMessage;
   lpSender, lpRecepient: TMapiRecipDesc;
   FileAttach: TMapiFileDesc;
   SM: TFNMapiSendMail;
   MAPIModule: HModule;
   Flags: Cardinal;
begin
  // cria propriedades da mensagem
   FillChar(Msg, SizeOf(Msg), 0);
   with Msg do
      begin
         if (Assunto <> '') then lpszSubject := PChar(Assunto);
         if (Texto <> '') then lpszNoteText := PChar(Texto);

         // remetente
         if (De <> '') then
            begin
               lpSender.ulRecipClass := MAPI_ORIG;
               lpSender.lpszName := PChar(De);
               lpSender.lpszAddress := PChar(De);
               lpSender.ulReserved := 0;
               lpSender.ulEIDSize := 0;
               lpSender.lpEntryID := nil;
               lpOriginator := @lpSender;
            end;

         // destinatário
         if (Para <> '') then
            begin
               lpRecepient.ulRecipClass := MAPI_TO;
               lpRecepient.lpszName  := PChar(Para);
               lpRecepient.lpszAddress := PChar(Para);
               lpRecepient.ulReserved := 0;
               lpRecepient.ulEIDSize := 0;
               lpRecepient.lpEntryID := nil;
               nRecipCount := 1;
               lpRecips := @lpRecepient;
            end
         else
            lpRecips := nil;

         // cópia oculta
         if (COculta <> '') then
            begin
               lpRecepient.ulRecipClass := MAPI_BCC;
               lpRecepient.lpszName := PChar(COculta);
               lpRecepient.lpszAddress := PChar(COculta);
               lpRecepient.ulReserved := 0;
               lpRecepient.ulEIDSize := 0;
               lpRecepient.lpEntryID := nil;
               nRecipCount := 1;
               lpRecips := @lpRecepient;
            end;

         // arquivo anexo
         if (Arquivo = '') then
            begin
               nFileCount := 0;
               lpFiles := nil;
            end
         else
            begin
               FillChar(FileAttach, SizeOf(FileAttach), 0);
               FileAttach.nPosition := Cardinal($FFFFFFFF);
               FileAttach.lpszPathName := PChar(Arquivo);
               nFileCount := 1;
               lpFiles := @FileAttach;
            end;
      end;

   // carrega dll e o método para envio do email
   MAPIModule := LoadLibrary(PChar(MAPIDLL));
   if MAPIModule = 0 then
      Result := -1
   else begin
      try
         if Confirma then
            Flags := MAPI_DIALOG or MAPI_LOGON_UI
         else
            Flags := 0;
         @SM := GetProcAddress(MAPIModule, 'MAPISendMail');
         if @SM <> nil then
            Result := SM(0, Application.Handle, Msg, Flags, 0)
         else
            Result := 1;
      finally
         FreeLibrary(MAPIModule);
      end;
   end;
end;

Está funcionando bem, mas eu criei umas tags em um memo e passo o 
mesmo como o corpo da mensagem (variável texto).
Só que a função não aceita as tags.
Alguém sabe o que tenho que fazer para resolver este problema?

Grata

Mariana





-- 
<<<<< FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM >>>>>

Para ver as mensagens antigas, acesse:
 http://br.groups.yahoo.com/group/delphi-br/messages

Para falar com o moderador, envie um e-mail para:
 [EMAIL PROTECTED] ou [EMAIL PROTECTED]
 
Links do Yahoo! Grupos

<*> Para visitar o site do seu grupo na web, acesse:
    http://br.groups.yahoo.com/group/delphi-br/

<*> Para sair deste grupo, envie um e-mail para:
    [EMAIL PROTECTED]

<*> O uso que você faz do Yahoo! Grupos está sujeito aos:
    http://br.yahoo.com/info/utos.html

 



Responder a