Outbound SMTP Configuration's "Send Test Email" overrides configured Sender address #4309

Closed
opened 2026-02-20 16:16:03 -05:00 by deekerman · 1 comment
Owner

Originally created by @andrmo on GitHub (Jun 1, 2020).

Issue

The Send Test Email facility on the Outbound Email configuration screen works wrongly. When using it the user is prompted for the "Email Address For Test Notification". However the provided email address is used as both the sender and receiver (ie TO / FROM headers) in the test email. This effectively overrides / ignores the "From Address" value provided elsewwhere in the configuration dialog. This also means that the user can only specify an address in the "Email Address For Test Notification" field for which they have SEND permission - which will normally be only their own email address. Ie they can't test sendng to recipients outside their domain, because the mail server probably won't permit that email address to be used in the FROM address.

This is on a clean 7.10.25 installation.

Expected Behavior

Test emails should use the valued configured in the "From Address" as the FROM address. It should override that, because that's not testing the configured settings

Actual Behavior

It's using the address in the "Email Address For Test Notification" field as for both the sender and recipient.

Possible Fix

None

Steps to Reproduce

This is what I did as I started with a fesh clean installation. It can be abbreviated, by starting at step #4

  1. Installed a clean 7.10.25 with demo data
  2. Configured LDAP auth and logged in as a second user (User2)
  3. Admin configured an outbound system unauthenticated email account
  4. User2 adds a personal Office365 email account and selects the "Send Test Email" option. For the notification address specify a valid email to which you DO have SendAs privileges in your mail account – this should be different to the “From Address” you’ve already specified. The email will be delivered and both the TO and FROM email addresses will be the same and not be your FROM address.
    If you don’t have the privilege for the above, then you can prove it’s not working correctly by instead specifying a valid email to which you DO NOT have SendAs privileges in your mail account – eg a personal email address in another domain, or a friend's email address. This time delivery will fail though it shouldn’t if the From Address was being used correctly. For me the error in the SMTP log, which is helpfully provided in the Mail Account popup, was:
    SMTP ERROR: DATA END command failed: 554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied

Context

This is not a huge problem, because most people will send test emails to themselves so will not notice the problem. But it is wrong and for system admins setting up email the incorrect operation doesn't lend itself to building confidence in the email system. I'd say the priority is low

Your Environment

SuiteCRM Version used: 7.10.25 (Clean install)
Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): n/a
Environment name and version (e.g. MySQL, PHP 7): MySQL: 5.7.30-0, PHP: 7.2.24
Operating System and version (e.g Ubuntu 16.04): 18.04

Originally created by @andrmo on GitHub (Jun 1, 2020). #### Issue The Send Test Email facility on the Outbound Email configuration screen works wrongly. When using it the user is prompted for the "Email Address For Test Notification". However the provided email address is used as both the sender and receiver (ie TO / FROM headers) in the test email. This effectively overrides / ignores the "From Address" value provided elsewwhere in the configuration dialog. This also means that the user can only specify an address in the "Email Address For Test Notification" field for which they have SEND permission - which will normally be only their own email address. Ie they can't test sendng to recipients outside their domain, because the mail server probably won't permit that email address to be used in the FROM address. This is on a clean 7.10.25 installation. #### Expected Behavior Test emails should use the valued configured in the "From Address" as the FROM address. It should override that, because that's not testing the configured settings #### Actual Behavior It's using the address in the "Email Address For Test Notification" field as for both the sender and recipient. #### Possible Fix None #### Steps to Reproduce This is what I did as I started with a fesh clean installation. It can be abbreviated, by starting at step #4 1. Installed a clean 7.10.25 with demo data 2. Configured LDAP auth and logged in as a second user (User2) 3. Admin configured an outbound system unauthenticated email account 4. User2 adds a personal Office365 email account and selects the "Send Test Email" option. For the notification address specify a valid email to which you DO have SendAs privileges in your mail account – this should be different to the “From Address” you’ve already specified. The email will be delivered and both the TO and FROM email addresses will be the same and not be your FROM address. If you don’t have the privilege for the above, then you can prove it’s not working correctly by instead specifying a valid email to which you DO NOT have SendAs privileges in your mail account – eg a personal email address in another domain, or a friend's email address. This time delivery will fail though it shouldn’t if the From Address was being used correctly. For me the error in the SMTP log, which is helpfully provided in the Mail Account popup, was: ``` SMTP ERROR: DATA END command failed: 554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied ``` #### Context This is not a huge problem, because most people will send test emails to themselves so will not notice the problem. But it is wrong and for system admins setting up email the incorrect operation doesn't lend itself to building confidence in the email system. I'd say the priority is low #### Your Environment SuiteCRM Version used: 7.10.25 (Clean install) Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): n/a Environment name and version (e.g. MySQL, PHP 7): MySQL: 5.7.30-0, PHP: 7.2.24 Operating System and version (e.g Ubuntu 16.04): 18.04
Author
Owner

@johnM2401 commented on GitHub (Jun 27, 2025):

Hey!

I've given this a try and this appears to no longer be an issue in the latest release of SuiteCRM.

I've sent a test email from both Admin->Email Settings and an Outbound Personal Account

On both, the To/From header values on the recieved email are different, and show as was set in the CRM

For example:

Image

Image


I'm going to close this off for now.
However, if you're still seeing this issue in the latest releases, (or I have perhaps misunderstood the issue), please get in touch.

Thank you for your contribution to the project!

@johnM2401 commented on GitHub (Jun 27, 2025): Hey! I've given this a try and this appears to no longer be an issue in the latest release of SuiteCRM. I've sent a test email from both Admin->Email Settings and an Outbound Personal Account On both, the To/From header values on the recieved email are different, and show as was set in the CRM For example: ![Image](https://github.com/user-attachments/assets/9ad6e5a8-52ff-43bd-a6d4-9b27f1d9c61d) ![Image](https://github.com/user-attachments/assets/a0da97d3-45de-4257-afa9-314b1b2adc59) <br> I'm going to close this off for now. However, if you're still seeing this issue in the latest releases, (or I have perhaps misunderstood the issue), please get in touch. Thank you for your contribution to the project!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4309
No description provided.