Emails
jetQuery has a built-in:
- Mailing service that is fully customizable, with support for:
- sending emails using SMTP and receiving emails using POP3,
- mail storage,
- multiple email accounts.
- System service which sends emails using SMTP for system messages like password recovery and notifications.
Mailing service
REST API
POST {{host}}/api/core/mail/send/{account}- send a single email using the specified account.GET/POST {{host}}/api/core/mail/pull/{account?}- pull emails; the account is optional.
Data objects
[app].[mail]- mail storage for incoming and outgoing emails.[app].[mail].[mail_attachments]- XML field attachments.[app].[mail].[mail_body_text]- text only.[app].[mail].[mail_body_html]- safe HTML representation.
[app].[files]- file storage.
Notes: Mails can be put directly into storage and sent using the push or sync API.
Mail accounts configuration
Mail account configuration is stored in
team settings: Settings+Teams+Team Secret .
The team type must be set to mail to be able to store mail account configuration.
To send or receive emails you need to be part of the mail team
Example configuration
Office365 example configuration
- Shared mailbox send is supported in this scenario
mail_from- your shared mailbox emailmail_username- your real email
- Authentication must be enabled
- POP3 must be enabled in the options.
Google Workspace / Gmail configuration
- POP3 must be enabled in the options.
- less secure apps option must be enabled in google account settings > security
- There must be a 'recent:' prefix before the username, otherwise you might receive, first 270 messages unread emails only.
- App passwords must be set if two factor authentication is enabled. An app password is a 16-digit passcode https://myaccount.google.com/apppasswords
| JSON | |
|---|---|
Examples
Pull email example
| HTTP | |
|---|---|
Optional query parameters:
debug=true- debug mode, useful for troubleshooting
Send email example
Business Objects:
[app].[mail_set]- set mail[app].[mail_onComplete]- business logic- mail_attachments - comma separated values of file_uuid from
[app].[files]data object
System configuration
For system messages, for example password recovery, the system configuration is used.
Configuration is stored in app.settings.json
After changes, Recycle application pool is required!
Standard SMTP configuration:
| JSON | |
|---|---|
Faq
Troubleshooting Pop3
Pop3 test in python
In case of any problems you can test your configuration using a Python script
| Python | |
|---|---|
Troubleshooting Smtp
SMTP test in python
In case of any problems you can test your configuration using a Python script
| Python | |
|---|---|