Select Page

Configure asynchronous email notifications in Magento

I am working on a new Magento ecommerce site and wanted to find out more on the Asynchronous Sending of Sales Emails feature. While digging into Adobe’s documentation, their Configuration best practices page or the Sales Emails don’t really explain how this works. Still puzzled as to why this isn’t the default behaviour although recommended by Adobe themselves, I found the Proper way to configure asynchronous email sending in Magento article which I thought it is worthy of sharing and saving in my bookmark. This article explains how it works and how to do it on an existing website which comes with a caveat (see SQL statements).

How to create a WildDuck DKIM key for a new domain

After adding a new domain to the WildDuck configuration you might also want to create a DKIM key for that domain.

A new DKIM key can be created via API.
I’m using Insomnia and I have created a POST request posting to /remote-api/dkim API URL and configured the X-Access-Token header with the authentication accessToken value from /etc/wildduck/wildduck-webmail.toml (see the [api] section in that file):

Then in the Query tab we can add a selector of our choice and the domain name:

Now we can press Send and copy the value (e.g. v=DKIM1;t=s;p=...) from the Preview tab into our new TXT DNS record.

How to add multiple domains to WildDuck Webmail?

How to add multiple domains to WildDuck Webmail?

WildDuck is a simple mail server solution and is often accompanied by the WildDuck Webmail service. While you can create email addresses with any domain via both the WildDuck’s API and the Webmail GUI, when it comes to aliases and the ease of use of the user interface, by default you’re only limited to the one you’ve initially configured.

To add further domains to choose from when creating alias addresses, edit the wildduck-webmail.toml file (it is located in /etc/wildduck/) and add your additional domains in the domains=[] array like so:

[service]
...
# allowed domains for new addresses
domains=["oviliz.com","seconddomain.com"]

Restart the webmail service with systemctl restart wildduck-webmail and you’re good to go.

Now if you want to also create a separate DKIM key and DNS record, follow this short guide.

Download an entire website with wget, along with assets

# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com

# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
--restrict-file-names=windows \ # Modify filenames to work in Windows as well.
--domains yoursite.com \ # Do not follow links outside this domain.
--no-parent \ # Don't follow links outside the directory you pass in.
yoursite.com/whatever/path # The URL to download

Source: https://gist.github.com/mikecrittenden/fe02c59fed1aeebd0a9697cf7e9f5c0c