cms
cms copied to clipboard
[4.x]: Craft not sending STMP emails.
What happened?
Description
Craft 4 doesn´t send emails using STMP protocol. Doesn´t send test emails from Admin section ( test email ) and doesnt send email using Contact Form plugin. The email is from the current hosting and domain. Triple check username, server, port and password. From the Craft Admin test ( Email ) the test email show as sended ( attach screenshot )
Uploaded a PHPMailer test file using same email account with SMTP and works great, on the server and in localhost.
Update
Tested with a clean ( no plugins at all ) latest Craft v4 install, and doesn´t work either. Use several SMPT mails accounts that i know are working.
Log file in /storage/ folder shows this ( cleared all the file, just show this on contact form send ).
2023-08-25 20:10:18 [web.ERROR] [yii\web\HttpException:503] {"trace":["#0 /home2/xxxxxx/vendor/craftcms/cms/src/web/Controller.php(175): craft\\web\\Controller->_enforceAllowAnonymous(Object(yii\\base\\InlineAction))","#1 /home2/xxxxxx/vendor/yiisoft/yii2/base/Controller.php(176): craft\\web\\Controller->beforeAction(Object(yii\\base\\InlineAction))","#2 /home2/xxxxxx/vendor/yiisoft/yii2/base/Module.php(552): yii\\base\\Controller->runAction('robots', Array)","#3 /home2/xxxxxx/vendor/craftcms/cms/src/web/Application.php(304): yii\\base\\Module->runAction('seo/seo/robots', Array)","#4 /home2/xxxxxx/vendor/yiisoft/yii2/web/Application.php(103): craft\\web\\Application->runAction('seo/seo/robots', Array)","#5 /home2/xxxxxx/vendor/craftcms/cms/src/web/Application.php(289): yii\\web\\Application->handleRequest(Object(craft\\web\\Request))","#6 /home2/xxxxxx/vendor/yiisoft/yii2/base/Application.php(384): craft\\web\\Application->handleRequest(Object(craft\\web\\Request))","#7 /home2/xxxxxx/public_html/index.php(12): yii\\base\\Application->run()","#8 {main}"],"memory":1312424,"exception":"[object] (craft\\web\\ServiceUnavailableHttpException(code: 0): at /home2/xxxxxx/vendor/craftcms/cms/src/web/Controller.php:211)"}
2023-08-25 20:10:18 [web.WARNING] [application] Request context: {"vars":{"_GET":{"p":"robots.txt"},"_POST":[],"_FILES":[],"_COOKIE":[],"_SERVER":{"LSPHP_ENABLE_USER_INI":"on","PATH":"/usr/local/bin:/usr/bin:/bin","TEMP":"/tmp","TMP":"/tmp","TMPDIR":"/tmp","PWD":"/","HTTP_ACCEPT":"text/plain,text/html,*/*","HTTP_ACCEPT_ENCODING":"gzip, deflate, br","HTTP_CONNECTION":"keep-alive","CONTENT_LENGTH":"0","HTTP_HOST...
Craft CMS version
4.5.2
PHP version
8.2.9
Operating system and version
Linux 4.19.286-203.ELK.el7.x86_64
Database type and version
MySQL 23
Image driver and version
Imagick 3.5.0 (ImageMagick 6.9.10-68)
Installed plugins and versions
Contact Form 3.0.1
Contact Form Honeypot 2.0.0
Control Panel Nav 4.0.10 Image Resizer 3.0.7
Minify 4.0.0-beta.2
Redactor 3.0.4
SEO 4.2.1
I just tested Settings->Email using SMTP settings on a fresh Craft 4.5.2 install and I received the test email successfully.
It did turn up a UI bug, but I don't think that it is related.
Focussing on the Settings->Email test only, can you load that page in the control panel, enable DevMode, delete the contents of Craft's storage/logs
folder, then click the "Test" button, and share a zipped storage/logs
folder? Feel free to send to [email protected] and reference issue 13611 if you don't to share publicly.
It did turn up a UI bug, but I don't think that it is related.
@angrybrad Yes, i spotted the same ui bug, but when i try to save it throws the error and fill the fields.
and share a zipped storage/logs folder?
Sure, i just sended it. Thank you.
Craft 4.5.3 is out now with a fix for that UI bug.
For posterity, it looks like the OP’s underlying issue was a blocklisted email server.