Axios error trying to verify email setup

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.7
  • Operating system and version (e.g., Ubuntu 24.04):
    • Centos Stream 9
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.62
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • not in play - yet
  • PHP version (e.g, 8.3):
    • 8.3.19
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • On initial configuration
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Unzip archive downloaded from Nextcloud
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Yes - Mailgun for SMTP

Summary of the issue you are facing:

[…]

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

[root@web01 config]# cat config.php
<?php
$CONFIG = array (
  'instanceid' => '<snip>',
  'passwordsalt' => '<snip>',
  'secret' => '<snip>',
  'trusted_domains' =>
  array (
    0 => 'URL#0',
    1 => 'URL#1',
  ),
  'datadirectory' => '/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '31.0.7.1',
  'overwrite.cli.url' => 'my URL',
  'dbname' => 'nextcloud',
  'dbhost' => 'db1',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '<snip>',
  'installed' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => '6379',
    'timeout' => 0.0,
  ),
  'maintenance' => false,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '<snip>',
  'mail_smtphost' => 'smtp.mailgun.org',
  'mail_smtpport' => '587',
  'maintenance_window_start' => 3,
  'default_phone_region' => 'US',
  'loglevel' => 2,
  'mail_smtpauth' => true,
  'mail_smtpname' => 'The actual account email on mailgun',
  'mail_smtppassword' => '<snip>',
);

Apps

None yet - still working on config issues

1 Like

From what I can tell your mail config looks reasonable for usage with Mailgun.

Does the Nextcloud account your testing from (i.e. your administrator account) have an email address configured yet?

The Axios email verification error is likely due to CORS or misconfigured SMTP settings. Since you’re using Mailgun with SMTP, double-check that ‘mail_smtpname’ exactly matches your Mailgun SMTP login (usually postmaster@yourdomain.com), ensure port 587 is open and not blocked by a firewall, and that SELinux (if enabled) isn’t interfering. Also, confirm that Mailgun allows sending from the domain set in ‘mail_domain’. Finally, check your browser’s developer console for CORS errors—adding your domain to the trusted_domains and setting ‘overwrite.cli.url’ correctly should help resolve it. ⩇⩇:⩇⩇

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.