I am getting the following error when trying to send a test email immediately after installing the module:

Error sending email (from admin@xq42.com to test2@xq42.com with reply-to not set).

It is clear from some Google searching that a "reply-to" needs to be set somewhere, but I cannot find any info on where that might be. Any help would be much appreciated!

Thanks,
Dan

CommentFileSizeAuthor
#21 Screenshot from 2020-03-03 15-59-51.png10.57 KBmyvo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dang42 created an issue. See original summary.

vishnujayadhevan’s picture

Me too have the same issue

danielbeeke’s picture

Title: Cannot send email without a "reply-to" set » Cannot send email without a "reply-to" set, maybe missing mail system setting.
Category: Support request » Bug report
Status: Active » Needs work

We had this issue, for us it was the setting inside system.mail.yml. The interface.default was still on php_mail instead of SMTPMailSystem

/config/active/system.mail.yml (this file is probably on a different place or in database)

interface:
  default: SMTPMailSystem
langcode: nl
enrico200165’s picture

I see to have the same problem, in the log I find

User error: Invalid placeholder (!name) in string: The name that all e-mails will be from. If left blank will use a default of: !name in Drupal\Component\Render\FormattableMarkup::placeholderFormat() (linea 240 di /var/www/digipmi/core/lib/Drupal/Component/Render/FormattableMarkup.php).

this despite having set the from address in the module config and in system configuration,
I also modified system.mail.yaml to contain

interface:
default: 'SMTPMailSystem'

ptmkenny’s picture

estoyausente’s picture

Added related issue. Placeholders items can be related.

estoyausente’s picture

With the patch uploaded in https://www.drupal.org/node/2651976 this issue seems that is resolved too.

estoyausente’s picture

Component: Documentation » Code
Status: Needs work » Needs review
ptmkenny’s picture

Status: Needs review » Needs work

I still got the message:

Error sending email (from abc@xyz.com to test@example.com with reply-to not set).

after applying the patch referenced in #7.

Watchdog showed this as a "mail" error, which was also accompanied by an "smtp" error:

Error sending e-mail from abc@xyz.com to test@example.com : SMTP Error: Could not connect to SMTP host.

In this case, I had the SMTP port wrong. Changing the port to the correct one resolved both errors. If the error is a wrong SMTP port, "reply-to not set" is a misleading error message.

richardu’s picture

I had these same errors/messages and was not able to send mail. I solved the problem by installing the Mail System module and setting SMTP mail as default formatter plugin and as default sender plugin.
(on Drupal 8.0.3). I did not apply any patch.

Edit: when I configured another e-mail account, the messages returned and no mail was sent. In debugging mode, I saw that my credentials were rejected. The log messages themselves are not very helpful to find out what really is the problem. With the correct credentials, the messages were no longer created.

estoyausente’s picture

I think that this module not work correctly without some patches that are in RTBC, and I have some problems to test the module with these errors :S

I hope that we commit these patchs asap and then we try to resolve related issues (like this).

ToxaViking’s picture

Have the same issue. Core - 8.1.1

asrob’s picture

Priority: Normal » Major
kashandarash’s picture

Assigned: Unassigned » kashandarash
kashandarash’s picture

Assigned: kashandarash » Unassigned
pazhyn’s picture

Status: Needs work » Needs review

This issue is reproducing only if the email is not send by server.
Settings for Gmail:
smtp.gmail.com
port 465
your login and password

The error message is "Error sendign email"
'Reply-To not set' is additional information, not the reason of the error.

dpovshed’s picture

Priority: Major » Normal
Status: Needs review » Closed (works as designed)

Thank you for your comments ##9, 10, 16

This is clear that error message about 'reply-to' is just side-effect of inability to sent a message. I also see if I miconfigured server parameter I see 3 messages with 'error' severity. Most important is 'Unable to sent email'. Two others are just less important, including one with 'reply-to'.

Let us close the issue then. In case topicstarter is absolutely sure that reply-to impact email sending in some way, please feel free to reopen the issue with more detail.

yeskmilo’s picture

Hi all, #3 solved this issue for me.

Update default value to "SMTPMailSystem" on system.mail.yml

FiNeX’s picture

Same bug here, Gmail smtp server, Drupal 8.4.2 and SMTP 8.x-1.0-beta3. The patch #3 doesn't fix the problem.

zuhair_ak’s picture

I had the same issue, but the problem was SMTP was not default mail system & empty body in mail. The issue is not related to reply-to being empty.

myvo’s picture

Resolved it by 2 steps in Drupal 8:
1. Config the SMTP server correctly at /admin/config/system/smtp
2. Go to Mail System configuration (/admin/config/system/mailsystem) then add the SMTP module with formatter is SMTP Mailer and Sender is SMTP mailer too. See the attached image

charlie1volley’s picture

Hi,

I am very new to configuring email in Drupal, so perhaps this is a no brainer, but thought I'd share my experience...

I was getting this same error when configuring any of these 3 modules for SMTP email: SMTP, Swiftmailer, or Easy Email (which is dependent on Swiftmailer). When I changed the Basic Site Settings (/admin/config/system/site-information) email address to match the SMTP email address, all 3 modules' test emails worked. If your site email address is different than the SMTP email address and changing the site email address is an option for you, maybe this can help (but I can't explain why...) :-) -c

jami3z’s picture

I have tried #21 but I am still getting the same error (#22 is correct).

paradizex’s picture

I was also getting the same error after upgrading the module.So, after investigating, I discovered that our organization's mail server didn't support TLS. So, turned it OFF in the smtp settings and emails started working again