Email

Email — composing email messages

Functions

Description

These functions let applications send email, by prompting the user to compose a message. The email may already have an address, subject, body or attachments.

The underlying portal is org.freedesktop.portal.Email.

Functions

xdp_portal_compose_email ()

void
xdp_portal_compose_email (XdpPortal *portal,
                          XdpParent *parent,
                          const char *const *addresses,
                          const char *const *cc,
                          const char *const *bcc,
                          const char *subject,
                          const char *body,
                          const char *const *attachments,
                          GCancellable *cancellable,
                          GAsyncReadyCallback callback,
                          gpointer data);

Presents a window that lets the user compose an email, with some pre-filled information.

When the request is done, callback will be called. You can then call xdp_portal_compose_email_finish() to get the results.

Parameters

portal

a XdpPortal

 

parent

parent window information.

[nullable]

addresses

the email addresses to send to.

[nullable]

cc

the email addresses to cc.

[nullable]

bcc

the email addresses to bcc.

[nullable]

subject

the subject for the email.

[nullable]

body

the body for the email.

[nullable]

attachments

an array of paths for files to attach.

[nullable]

cancellable

optional GCancellable.

[nullable]

callback

a callback to call when the request is done.

[scope async]

data

data to pass to callback .

[closure]

xdp_portal_compose_email_finish ()

gboolean
xdp_portal_compose_email_finish (XdpPortal *portal,
                                 GAsyncResult *result,
                                 GError **error);

Finishes the compose-email request.

Parameters

portal

a XdpPortal

 

result

a GAsyncResult

 

error

return location for an error

 

Returns

TRUE if the request was handled successfully