CAN`T SEND EMAIL FROM USERS EMAIL ADDRESSES - URGENT PLEASE HELP

I need your help with users mailboxes

I can`t send emails from each user email address.

I read a lot of articles on the forum also I checked in Sugar CRM forum but I can`t find the solution to resolve my issue.

I am using Microsoft exchange mailboxes

I can send email only with the email which is in Global Email Settings.

I configured users email addresses but does not work.

Also in Microsoft exchange, I created connector and I add suite CRM server IP address but the problem does not resolve. Also, because in admin email settings I have publicttcm@ttcm.com email address I gave access to my users to send behalf on this mailbox from Microsoft Exchange Admin panel but again problem does not resolve.

I log in to the user portal and I created from user settings mail account when I test the settings I received the email When I tried to send an email to lead which is assigned under my user mail does not send.

Also, mailboxes created in Inbound Email and Outbound Email.

in Global Email Settings, I have publicttcm@traders-trust.com. I did a test and I received the email without any problem. Also, when I have this mailbox for all users to sending emails working without any issues.

Error Message :

Wed May 23 15:38:50 2018 [17250][7a70e3bf-7aca-57c7-9b85-5b052de2e3d5][FATAL] SugarPHPMailer encountered an error: SMTP Error: Could not authenticate.

Admin Email Settings :

User Email Settings

User Error Message

Outbound Email Account (is user mailbox)

Error message

What is your SuiteCRM version? (if I had a dollar for every time I asked that question…)

When you do the “Send test email”, and it fails, it should show you a link to see the “Full SMTP log”, click it and check out the details.

Suite version is Version 7.10.2 - Sugar Version 6.5.25 (Build 344)

Please keep in mind that we have the same issue with Sugar CRM CE same version as above and one of the reason for us to switch in Suite CRM is this!!! (Emails)!

For your info about email address which added in Global Email settings (Admin Panel), I gave access to my users to send behalf on this mailbox in Microsoft exchange portal but also with this way does not work, the same error message display :

Mon Jun 4 12:30:49 2018 [22546][1f324263-04f5-4c76-6834-536795d757f1][FATAL] Suan error: SMTP Error: data not accepted.

I can`t imagine that this problem does not resolve yet… is mandatory this for all

Please advise if you find solution for it…

My advice is to wait for version 7.10.6 which should be coming out soon, and upgrade. This email code has been evolving too much for me to be able to know what was in 7.10.2 and what wasn’t…

I upgraded to latest version 7.10.7 but the issue does not resolve. SMTP Outgoing SMTP Mail servers for Microsoft exchange accounts does not work also with the version 7.10.7

Error:
SugarPHPMailer encountered an error: SMTP Error: data not accepted.( suitecrm.log)

From Suite CRM HTTP Interface:

Error:SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: 5.7.60 SMTP; Client does not have permissions to send as this sender [VI1PR05MB1567.eurprd05.prod.outlook.com] SMTP code: 550

See full SMTP Log:

3: Connection: opening to smtp.office365.com:587, timeout=300, options=array (
)
3: Connection: opened
2: SERVER -> CLIENT: 220 AM0PR06CA0048.outlook.office365.com Microsoft ESMTP MAIL Service ready at Mon, 9 Jul 2018 14:51:53 +0000

1: CLIENT -> SERVER: EHLO crm.ttcm.com

2: SERVER -> CLIENT: 250-AM0PR06CA0048.outlook.office365.com Hello [34.246.5.105]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8

1: CLIENT -> SERVER: STARTTLS

2: SERVER -> CLIENT: 220 2.0.0 SMTP server ready

1: CLIENT -> SERVER: EHLO crm.ttcm.com

2: SERVER -> CLIENT: 250-AM0PR06CA0048.outlook.office365.com Hello [34.246.5.105]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-AUTH LOGIN XOAUTH2
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8

1: CLIENT -> SERVER: AUTH LOGIN

2: SERVER -> CLIENT: 334 VXNlcm5hbWU6

1: CLIENT -> SERVER: —obfuscated—
2: SERVER -> CLIENT: 334 UGFzc3dvcmQ6

1: CLIENT -> SERVER: —obfuscated—
2: SERVER -> CLIENT: 235 2.7.0 Authentication successful target host VI1PR05MB1567.eurprd05.prod.outlook.com

1: CLIENT -> SERVER: MAIL FROM:

2: SERVER -> CLIENT: 250 2.1.0 Sender OK

1: CLIENT -> SERVER: RCPT TO:

2: SERVER -> CLIENT: 250 2.1.5 Recipient OK

1: CLIENT -> SERVER: DATA

2: SERVER -> CLIENT: 354 Start mail input; end with .

1: CLIENT -> SERVER: Date: Mon, 9 Jul 2018 14:51:53 +0000

1: CLIENT -> SERVER: To: ych@ttcm.com

1: CLIENT -> SERVER: From: “Yiannis C.”

1: CLIENT -> SERVER: Subject: Test Email from SuiteCRM

1: CLIENT -> SERVER: Message-ID:

1: CLIENT -> SERVER: X-Mailer: PHPMailer 5.2.25 (https://github.com/PHPMailer/PHPMailer)

1: CLIENT -> SERVER: MIME-Version: 1.0

1: CLIENT -> SERVER: Content-Type: text/plain; charset=UTF-8

1: CLIENT -> SERVER: Content-Transfer-Encoding: quoted-printable

1: CLIENT -> SERVER:

1: CLIENT -> SERVER: This email was sent in order to test the outgoing mail server information p=

1: CLIENT -> SERVER: rovided in the SuiteCRM application. A successful receipt of this email ind=

1: CLIENT -> SERVER: icates that the outgoing mail server information provided is valid.

1: CLIENT -> SERVER:

1: CLIENT -> SERVER: .

2: SERVER -> CLIENT: 550 5.7.60 SMTP; Client does not have permissions to send as this sender [VI1PR05MB1567.eurprd05.prod.outlook.com]

1: SMTP ERROR: DATA END command failed: 550 5.7.60 SMTP; Client does not have permissions to send as this sender [VI1PR05MB1567.eurprd05.prod.outlook.com]

3: SMTP Error: data not accepted.

Does anyone has the same issue and find a solution? Please advise

It’s probably the “From” name and address. So you might be trying to send as joe@gmail.com through outlook.com, and it doesn’t let you.

If you’re sure you configured it correctly, you can check if SuiteCRM is sending the correct name by uncommenting this line:

https://github.com/salesagility/SuiteCRM/blob/master/include/SugarPHPMailer.php#L446

Also change the word “debug” to “fatal”, like this:

$GLOBALS['log']->fatal("PHPMailer Send Function: { FromName: $this->FromName From: $this->From Host: $this->Host UserName: $this->Username }");

Now you can check your logs after sending and confirm if “From” and “From name” match your Account as it is defined on the server.

Hello and thank you for your reply.

As i can see from log file FromName is correct but in FROM: display the recipient email address

See below :

Tue Jul 10 09:06:41 2018 [8627][780ddb1d-1702-5d51-b59c-520523390ff7][FATAL] PHPMailer Send Function: { FromName: Nordine M. From: it@traders-trust.com Host: smtp.office365.com UserName: nme@ttcm.com }

And in outgoing mail server Properties i have :

Name: Nordine
From Name: nme@ttcm.com
From Address: nme@ttcm.com
Exchange Server: smtp.office365.com
Exchange Sever Port: 587
Enable SMTP over SSL or TLS: TLS
Exchange User name: nme@ttcm.com
Exchange Password: xxxxxxxx

For sure user credentials and Microsoft exchange settings are correct. I do not know if the problem is the value in FROM email address which showing recipient email address If anyone knows please let me know.

The above settings configured with admin user in user management -> user->edit -> settings -> mail accounts -> add

I see something else very strange. When i tried to configured outbound email settings from admin panel with same settings as above it`s working and i received the test email, but does not showing the specific email account in user email settings so i can choose it from there.

Please advise because i must find a solution yesterday :slight_smile:

Outbound Email

Outbound Email Accounts

Outbound Email Accounts Settings

Results:

I can’t assigned above account to any user because does not showing anywhere only global mail account showing.

User settings :


And when i tested from user mail accounts settings to add new outgoing Mail Server with admin user

Add mail settings to user from user management with admin user :

Email Address for test notification

ych@ttcm.com

Results :

Tue Jul 10 09:24:54 2018 [8570][1][FATAL] PHPMailer Send Function: { FromName: Yiannis C. From: ych@ttcm.com Host: smtp.office365.com UserName: nme@ttcm.com }

There is a bug with From Name, I’m not sure what you’re getting is exactly the same, but… let’s me give you a workaround and then let’s hope one of the next versions reviews this “From” code.

Just before that line where you uncommented the code to log the email settings, add this:


if (strcmp($this->FromName, 'Nordine M.') == 0) {
      $this->From = 'nme@ttcm.com';
}

This will force the correct value into place.

Thank you pgr for your help. I did above changes and now i am getting the error message client does not have permissions to send as this sender.

But this is not true because from user mailbox i can send behind this email address (csu@ttcm.com).

From Microsoft exchange, they informed that from the time that I can send behind of this mailbox then the problem still in Suite CRM.

Any ideas?

Error:SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: 5.7.60 SMTP; Client does not have permissions to send as this sender [HE1PR05MB1562.eurprd05.prod.outlook.com] SMTP code: 550

Just put the same “From” address as the email address you’re configuring, and the server will accept it for sure.

Hi,

Is the problem with sending emails through a user email (office 365 Smtp mail server) solved already? Version: Version SuiteCRM 7.10.10, Sugar Versie 6.5.25 (Maken 344).

We use Office 365 for exchange. The system email works fine and users can send email through the system email account. But we also want users to send email with their personal account. When a user creates a outgoing SMTP mail server with his own user account (email address) and from field is filled with the email address, and sends a test e-mail in de ‘outgoing mail server properties’, it works fine. But when an email is send from the module emails whereby from field is filled with the user account (SMTP) is gives an error (Error Sending Email. Please contact your administrator for assistance.).
In the system email settings Users may send as themselves is enabled.

Please advise. thanks in advance.

Hello Damo,

I tried all suggestions above and updates also but problem does not resolved.

We are using only one emal address for outgoing emails.

Maybe something is wrong in SugarPHPMailer.php but i do not know what…

Please try this workaround to see if it helps:

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/20055-outbound-email-unable-to-set-up-properly#74208

and give us your feedback afterwards. Thanks

That solution means that I’ve to put my business (personal) office 365 account stored in suitecrm? Is that safe?

it is as safe as your SuiteCRM installation is safe. It depends on how you keep your server, your password policies, user education, etc.

But I wouldn’t call this a “solution”, I called it a “workaround”… a better fix needs to come.

Note that not all fixes should be expected from SalesAgility, since that is literally impossible. Sometimes there needs to be someone in the Community that pays a PHP developer for a couple of days work to improve something that is needed for their company, and then contributes that to the entire Community.

When many people do that, we all win.

I’ve been having the same issues as most people on this topic thread: email servers are configured and tested successfully but when I try and send an email after clicking on a contract’s email address, I get an error stating, “Error Sending Email. Please contact your administrator for assistance…”

Just upgraded SuiteCRM to 7.11.0 which alone did not fix the problem, but I was able to get email working by clicking the box in Admin>Email Setting labelled “Users may send as themselves”. I successfully sent an email and it worked! FINALLY!

Hope this helps someone else.

:evil:
This bug still exists !!
Fix it - or SuiteCRM is useless and will die!
IT Gurus from the provider siteground tried to fix it in this way:

The issue is caused due to a bug in the current version of Suitecrm’s PHP mailer class script which causes the sender and recipient of each test message to be the same.

The only fix for the current version is to edit the script /include/SugarPHPMailer.php and uncomment the line numbers between 453 to 455, and add the needed sender credentials in them.

Doing similar test has brought the desired results as shown from the full test headers below:

Code:
Return-Path: institut@justizopfer-hilfe.at
Delivered-To: sgtest@justizopfer-hilfe.at
Received: from uk45.siteground.eu
by uk45.siteground.eu with LMTP id iKQ3GUTSW1w5bAAA8XWnnA
for sgtest@justizopfer-hilfe.at; Thu, 07 Feb 2019 06:37:56 +0000
Return-path: institut@justizopfer-hilfe.at
Envelope-to: sgtest@justizopfer-hilfe.at
Delivery-date: Thu, 07 Feb 2019 06:37:56 +0000
Received: from [77.104.173.243] (port=45908 helo=indoor-architecture.co.uk)
by uk45.siteground.eu with esmtpa (Exim 4.89_34-9f6032f-XX)
(envelope-from institut@justizopfer-hilfe.at)
id 1grdJs-0007Ch-Ad
for sgtest@justizopfer-hilfe.at; Thu, 07 Feb 2019 06:37:56 +0000
Date: Thu, 7 Feb 2019 00:37:56 -0600
To: sgtest@justizopfer-hilfe.at
From: SGTest institut@justizopfer-hilfe.at
Subject: Test Email from SuiteCRM
Message-ID: 80e0d1a46355b7b32c40112ef21d5f49@indoor-architecture.co.uk
X-Mailer: PHPMailer 5.2.25 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
SG-Abuse: user, USERNAME=indoora7 SENDER_HOST=77.104.173.243 MAIL=institut@justizopfer-hilfe.at

This email was sent in order to test the outgoing mail server information p=
rovided in the SuiteCRM application. A successful receipt of this email ind=
icates that the outgoing mail server information provided is valid.

The actual bug report can be seen in the following article:

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/19208-can-t-send-email-from-users-email-addresses-urgent-please-help

The fully updated code can be seen in the link below.

Unfortunately at this point, it is not compatible with the other SMTP classes of your application:

[url]https://github.com/salesagility/SuiteCRM/blob/46a9b2190347e2bdb2e3b29ae98fd087c3f477c5/include/SugarPHPMailer.php[.url]

You see, this bug needs a urgent fix.

Emails are the core of any CRM !

@Jog thanks for that report.

Is that on 7.11.0 or 7.11.1?

And did you re-create the accounts on the new version?

I ask because I am convinced this bug is already fixed, but I would like to further understand if it is a bug in the account creation code, you might have a left-over broken account in your database.

When I am debugging I usually try to keep an eye on the database itself, tables “outbound_email” and “inbound_email”, this usually provides valuable insights.

I’m having the same issue. How or what are you using to get around this?