Platforms to show: All Mac Windows Linux Cross-Platform

MapiMessageMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Windows MBS Win Plugin 8.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The class for a message.
Example
Var m as new MapiMessageMBS
Var r as new MapiRecipientMBS
Var o as new MapiRecipientMBS

o.Address="SMTP:sender@example.com"
o.Name="Me"
o.Type=o.TypeOriginator

r.Address="SMTP:receiver@example.com"
r.Name="You"
r.Type=o.TypeTo

m.AddRecipient r
m.Originator=o
m.Subject="Test Email"
m.NoteText="Hello World"
m.Flags=0

Var SendFlags as integer = m.kSendFlagDialog + m.kSendFlagLogonDialog

title=str(m.SendMail(self, SendFlags, false))

This can use Outlook or Thunderbird on Windows to send email with or without GUI.
Using Messaging Application Programming Interface (MAPI)

Does not work with Micorosft Outlook Web App as we need a locally installed Outlook with a MAPI component. Since Outlook for Windows is a web app wrapped in a desktop app, it doesn't do MAPI.

Message Flags

Constant Value Description
kFlagsReceiptRequested 2 A receipt notification is requested. Client applications set this flag when sending a message.

Note: Most email applications ignore the receipt notifications.
kFlagsSent 4 The message has been sent.
kFlagsUnread 1 The message has not been read.

Send Flags

Constant Value Description
kSendFlagDialog 8 Display a send note UI
A dialog box should be displayed to prompt the user for recipients and other sending options. When Dialog is false, at least one recipient must be specified.
kSendFlagLogonDialog 1 Display logon UI. more
kSendFlagNewSession 2 Don't use shared session
Create a new session.

This class has no sub classes.

Blog Entries

Release notes

  • Version 25.2
    • Added Recipients and Files functions to MapiMessageMBS class.
  • Version 18.5

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS Win Plugin.


MapiFileMBS   -   MapiRecipientMBS


The biggest plugin in space...