Project

General

Profile

Actions

Task #93635

closed

Add mail configuration for setting smtp domain

Added by Tim Schreiner about 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Mailer API
Target version:
-
Start date:
2021-03-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The Symfony Mailers EsmtpTransport supports setting a Domain name that is used for the EHLO Command.
By default, this contains [127.0.0.1]. But this should contain a valid domain name.

It seems that the Google Workspace SMTP relay server does not accept the default value and therefore fails sending mails.

The domain value should be configurable in the TYPO3 settings like

TYPO3_CONF_VARS['MAIL']['transport_smtp_domain'] = 'typo3.org';

Steps to reproduce:
Right now I only know about Google Workspace having issues with it.

  1. Visit admin.google.com and login with a Google Workplace Admin account.
  2. Navigate to Apps -> Google Workspace -> Gmail -> Advanced Settings
  3. Create a new SMTP Relay Service. You may use IP Restriction without authentication.
  4. Configure smtp email for TYPO3 using smtp-relay.gmail.com:465 as server and enable encryption
  5. Try sending a test email. The error message should say: Expected response code "250" but got an empty response.

Current workaround
You could use the AfterMailerInitializationEvent and set domain youself ($event->getMailer()->getTransport()->setLocalDomain('typo3.org')).
But remember to check, if you get the correct mailer and transport because the methods you call are not in the interfaces.

Actions

Also available in: Atom PDF