View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
18641Bug reportsOtherpublic2023-02-15 22:22
Reportermarcgold Assigned Toc_schmitz  
PrioritynoneSeveritypartial_block 
Status closedResolutionno change required 
Product Version5.6.x 
Summary18641: Email Sending Issue - SMTP Username
Description

As reported on the forum:
So I have recently moved over to LS5 and have just had the need to use the token based email with email invites. This has been a little problematic with the setup that works perfectly well on LS3.

Our email relay of choice is Amazons AWS SES service (Simple Email Service). This service works slightly different to other services as you:

  1. Create an account in the region you wish to use
  2. Setup the domains and the email addresses that are allowed to send through the service and verify them.
  3. Setup a SMTP sending account which provides you with a 16 digit Username (not an email address) and the associated password.

So in the SMTP sending setup in LS 3 or 5 - you enter:
Default site admin (over writable at survey level)
Outbound Mail server / port
Username
Password
Encryption
When you try and enter the AWS SES username as given in the format ABCDEFGHIJKLMNOP and send a test message in LS5 it returns with the error that the username is not a valid email address.

Interestingly LS3 and every other service I use SES with, this works perfectly with the same setup. Also, if I change the setup in LS5 to use my O365 account which does have an email address as the login it works perfectly. Interestingly in my O365 I have a shared mailbox with the ability to send - every other service i have that uses this logs in with the username in the format "my@email-address.com/noreply" (noreply is the shared mailbox) and it works. But LS5 doesn't like this as its not a email address.

But if i use O365 with the smtp in the format of "my@email-address.com" - It works perfectly.

It would seem that the SMTP username is being used as the FROM field within LS5
Although very often the SMTP Username is an email address - it isnt always ie AWS SES or O365 Sharedmailbox - SMTP OAuth.

Steps To Reproduce

Steps to reproduce

Setup any outbound email under global with a service that does not use a pure email address as the SMTP Username.

Expected result

Emails should be sent with the FROM: as the Default Site Admin Email in the Global Setup OR
Within the Survey itself: FROM -> Administrator email address: BOUNCE -> Bounce email address:

I think there should also be a REPLYTO: but I suppose this could just be the FROM: but there are scenarios that it would be and it is in the SMTP protocols.

Actual result

It doesnt work with none email address SMTP user names

(Write here what happened instead)

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)Version 5.6.5+230214
I will donate to the project if issue is resolvedNo
Browserany
Database type & versionn/a
Server OS (if known)Ubuntu
Webserver software & version (if known)Nginx
PHP Version8.1

Users monitoring this issue

There are no users monitoring this issue.

Activities

marcgold

marcgold

2023-02-14 23:42

reporter   ~73822

I have found the issue by looking through the core code.
Looks like there is / was a plugin mailSenderToFrom that was activated. Once switched off system worked.

Not sure if this is a plugin that I loaded or is core to the system. If the later can we change this ticket to Tweak - and add an error message on the Global Config page that this plugin is loaded.

DenisChenu

DenisChenu

2023-02-15 07:21

developer   ~73823

Looks like there is / was a plugin mailSenderToFrom that was activated. Once switched off system worked.

This was here just for O365 and some other system where all user (From, Response too etc … must be the Sender email) , it was not activated by default.

add an error message on the Global Config page that this plugin is loaded.

No, it was not activated by default, and descriptioin is clear enough https://github.com/LimeSurvey/LimeSurvey/blob/be70f935cdc3330262524e2a220dec764e5ff594/application/core/plugins/mailSenderToFrom/config.xml#L12

Force sender, From etc … to be the mail set for sending email. Some SMTP server need smtp user as From and Return-Path.

Issue History

Date Modified Username Field Change
2023-02-14 23:22 marcgold New Issue
2023-02-14 23:22 marcgold File Added: Screenshot 2023-02-14 at 13.07.32.png
2023-02-14 23:22 marcgold File Added: Screenshot 2023-02-14 at 13.05.32.png
2023-02-14 23:42 marcgold Note Added: 73822
2023-02-14 23:42 marcgold Bug heat 0 => 2
2023-02-15 07:21 DenisChenu Note Added: 73823
2023-02-15 07:21 DenisChenu Bug heat 2 => 4
2023-02-15 22:22 c_schmitz Assigned To => c_schmitz
2023-02-15 22:22 c_schmitz Status new => closed
2023-02-15 22:22 c_schmitz Resolution open => no change required