Inbound Mail
You can send email to your AppSynergy database by including your database email address in
the To, Cc or Bcc lines of any email. Your database email address
is YourAccountId@dbmail.appsynergy.com (you can find your Account ID via Help > About).
Inbound Mail Tables
Email received by your database is stored in a set of three related tables. These tables are visible on the palette
in the design window and can be used in your apps just like any other tables.
- InboundMail - all email messages received by your database.
- InboundMailAddress - all email addresses associated with a particular email message.
- InboundMailAttachment - all attachments associated with a particular email message.
Getting Started
The easiest way to get started is by creating a modal panel in your app that shows all email
matching a particular email address. The steps are:
- Report Widget: Drag a Report widget for the InboundMail table onto your modal panel.
Then, drop the InboundMailAddress table on top to join it.
- Data Link: Create a data link from another part of your application that contains
an email address, such as a customer record, to the Report widget on your email modal panel.
Additionally, add a button next to the email field that opens your email modal panel when clicked.
Now, when you click the button, it will display a list of matching emails in the modal panel.
You can further enhance your email modal panel by adding Record widgets for InboundMail and possibly
another Record widget for InboundMailAttachment. This way, when you click on a particular email,
it will pull up a detailed record with attachments.
Advanced Email Routing
You can set up a personalized email address on your own domain and route it to your database email address.
To successfully route email to your database from your own domain, the primary requirement is that you set
an email header like X-dbmail.appsynergy.com: db12345 where db12345 is your actual database account ID.
The following directions are for Google Workspace administrators.
Add Host
Add dbmail.appsynergy.com as a host you can forward mail to:
- Go to https://admin.google.com > Apps > Google Workspace > Gmail > Hosts > Add Route
- Set Name to dbmail.appsynergy.com
- Set Email server to dbmail.appsynergy.com
- Set Port to 587
- Under "2 options" check all boxes and then click the Test TLS connection link
Add Rule
Now you can add a mail forwarding rule to the host you just added:
- Go to https://admin.google.com > Apps > Google Workspace > Gmail > Default Routing > Add Another Rule
- Under "1. Specify envelope recipients to match", "Single recipient" specify an email address like db@mycompany.com
(the email address should be an unused email address on your company's domain)
- Under "2. If the envelope recipient matches the above, do the following", check Add custom header,
then set X-Header Key to dbmail.appsynergy.com and set Header Value to db12345
(replace db12345 with your actual database account ID)
- Change route > then change Normal Route to dbmail.appsynergy.com
- Envelope recipient > set Replace recipient to db12345@dbmail.appsynergy.com (replace db12345 with your actual database account ID)
Now mail sent to db@mycompany.com will be routed to your database.