Jump to content

An Error Occurred - Email Sending Failed


Recommended Posts

we encountered a problem sending emails to our clients using our WHMCS script v9.0.6. All emails, including order confirmations and welcome emails, are receiving the following errors:

An Error Occurred
Email Sending Failed - Unable to access email attachment storage

Email Sending Failed - The system encountered an error while attempting to access email attachment storage: Cannot find storage setting for asset type "email_template_attachments" (template attachments)

We have correctly configured System Settings > Storage Settings > Configurations to the locations /attachments, /downloads, and /templates_c folders. However, the System Settings > Storage Settings > Settings page displays nothing. See the following image: https://ibb.co/wZSmjWTG

We also changed the email setting provider to SMTP, but the problem persists

 

we wait your help

Link to comment
Share on other sites

  • 2 months later...

@drouba that error means WHMCS has no storage location assigned to the Email Template Attachments file type. Creating the three configurations isn't enough on its own, because each file type has to be assigned one of them on the Settings tab. Your problem is that the Settings tab renders empty, so there's nothing to choose from. Here is how I'd approach it:

 

1. Find out why the Settings tab is blank. Go to Configuration, System Settings, General Settings, open the Other tab, tick Display Errors, save, then reload Storage Settings and the Settings tab. A blank page usually has a PHP error behind it, and with Display Errors on you should get the actual message. Also look at the PHP error log for that account, usually an error_log file in the admin folder or the one in your home directory logs. Turn Display Errors off again when you're done, because it shows verbose errors to everyone.

 

2. Test the storage locations. On the Configurations tab each location has a play icon that tests it. The directories have to exist and be writable by the user PHP runs as. WHMCS's recommended layout is the attachments folder for client files, email attachments, email images, knowledgebase images and ticket attachments, and the downloads folder for downloads and for email template attachments. Note that templates_c isn't one of the file types on that Settings tab. It's the templates cache and is handled separately, so you don't need a storage configuration for it.

 

3. Once the Settings tab loads with its menus, set Email Template Attachments to the local downloads location and save. If you physically moved the folders, use Switch. If you created new empty ones, use Migrate so the files get copied.

 

Email Template Attachments is one of the eight types on that Settings tab, and all your templated emails (orders, welcome and so on) are failing with it, which fits an unassigned type. WHMCS staff gave this same fix in an older community thread with the same error text.

 

If the Settings tab stays blank and Display Errors shows nothing, open a ticket with WHMCS. Give them your version (you said 9.0.6), the exact error text and a screenshot of the Configurations tab, and ask them to look at why the Settings tab doesn't render. Check whether a newer 9.0 release is available first, since updating is a quick thing to rule out.

 

This only applies to self-hosted installs. On WHMCS Cloud they manage storage settings for you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated