Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi E-Mail in Outlook erstellen als plain text (https://www.delphipraxis.net/22491-e-mail-outlook-erstellen-als-plain-text.html)

DieHardMan 18. Mai 2004 09:07


E-Mail in Outlook erstellen als plain text
 
Ne E-Mail erstell ich ja so, aber die E-Mail hat trotz Standardeinstellung "Text" in Outlook, immer das Rich-Text Format, wie kann ich das ändern.

Hab mir schon die MailItem Eigenschaften angeschaut, aber da auch nix gefunden.

Delphi-Quellcode:
const
  olMailItem = 0;
  olByValue = 1;
var
  OutlookApp, MailItem, MyAttachments: OLEVariant;
begin
  try
    OutlookApp := GetActiveOleObject('Outlook.Application');
  except
    OutlookApp := CreateOleObject('Outlook.Application');
  end;
  try
    MailItem := OutlookApp.CreateItem(olMailItem);
    MailItem.Recipients.Add('YourMailAddress@something.com');
    MailItem.Subject := 'Your Subject';
    MailItem.Body   := 'Your Message';
    myAttachments   := MailItem.Attachments;
    MailItem.Display;
  finally
    myAttachments := VarNull;
    OutlookApp   := VarNull;
  end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:32 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz