craftcms / craftcms/cms

System emails are not being sent through.

Open
#4,452 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

Description

I recently ran composer update on my Craft 3 install and went into my Craft Commerce 2 settings. I updated some config in there and saved it all. I then went into Settings->Email and tried testing my email address and I didn't receive anything at all. On further inspection I could see in the logs there was a deprecation error which was:

The `defineComponents` event on CraftVariable has been deprecated. Use the `init` event to register custom components instead.
Source of error

/Users/me/Sites/client/vendor/craftcms/cms/src/web/twig/Extension.php:1032

This made me think it was my email templates but on further inspection it seems to be the Mailer.php file or something.

Steps to reproduce
  1. Updated Craft CMS 3 to latest stable release
  2. Went into Settings->Email and hit 'Test Email'
  3. Did not get any email back saying test successful
Additional info
  • Craft version: 3.1.32.1
  • PHP version: 7.3.4
  • Database driver & version: mysql
  • Plugins & versions:

Amazon S3 1.2.3
Asset Rev 6.0.2
Blitz 2.0.8
Contact Form 2.2.3
Craft Commerce 2.1.7
Craft Variants 1.0.1
Eager Beaver 1.0.4
Element API 2.5.4
Field Manager 2.0.5
Imgix 2.0.4
Kint 1.0.0
Redactor 2.3.2
Retour 3.1.16
Scout 1.2.1
SEOmatic 3.2.9
Stripe for Craft Commerce 2.0.1.1
Webperf 1.0.12
Wishlist 1.0.1
Wordsmith 3.0.5

Full stack trace of log warning below:

Screenshot 2019-06-26 at 14 20 33

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure from Settings->Email using the listed Craft CMS, PHP, database, and plugin versions, then inspect the warning at vendor/craftcms/cms/src/web/twig/Extension.php:1032 and the mentioned Mailer.php area. Done means the test email is sent successfully and the reported deprecation warning no longer accompanies the failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.