I was setting up an email service as part of our project and had to make sure that the emails which are being sent from our server will be accepted by email providers and delivered to the clients’ mailboxes. As you probably already know, delivering an email to the client’s mailbox can be a though one.

If anyone gets access to your private key file, they could start impersonating your email service and sending the emails in your name.

You can place the key file in a dedicated publicly accessible directory on your web server and then just limit the access to it. For example, you can place your public and private key file in a /dkim directory and then protect it with this line in .htaccess file: RewriteRule dkim/* — [F,L,NC]
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners