I have my own private mail server, and I can generate available email accounts at will. I wrote a simple program to complete the configuration and login of the email account through the QR code.
It is essentially migrating email accounts, the only difference is that it does not include user data, only the most basic configuration information.
- This program directly modifies the initial database generated by Delta Chat (including username; email address; password; server configuration; avatar, etc.);
- Send a request to the mail server to generate an email account, package the database as a TAR file, upload it to the HTTP server, and get the download link of this file;
- Convert the link to a QR code and display it on the screen;
- The user downloads this file to /storage/emulated/0/sdcard by scanning the QR code on the screen on the mobile phone;
- The user uses the “Import Backup” function of Delta Chat to import this file.
This program solves the following problems:
The process of manually configuring the mail server is omitted.
This program cannot solve the following problems:
Different users use different browsers, and the default download paths of these browsers may also be different. If Delta Chat cannot find a backup in /storage/emulated/0/sdcard, you need to manually move to this path.
This program cannot be used to back up user data, which means it is only for new users.