'Rails custom mail relay address

I am creating a rails app where I want to mask a customer's email address by providing them with a dummy one. Similar to Apples Private Relay. So for example, if a user is currently has an account whose email is [email protected], I would like to create an email similar to [email protected]. However, I still want [email protected] to be able to reach [email protected]. How can I achieve this?



Solution 1:[1]

Since rails 6 you can use Action Mailbox for this.

If your rails version is lower than 6 consider upgrading or otherwise you'll need to host a mail server on your own. Postfix is a good choice and somebody shared a sample configuration here.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kamil Gwó?d?