Email SMTP send as permission error

Email SMTP send as permission error

Si Yan發表於
Number of replies: 12

I have encountered an Email malfunction with send as permission error. The following is the error message I got. I have only change private info to xxx. Everything else remains. Please help me on this. Thanks!








-------------------------------------------------
2014-12-14 08:35:56    Connection: opening to smtp.office365.com:587, t=10, opt=array (
                                         )
2014-12-14 08:35:58    Connection: opened
2014-12-14 08:35:58    SMTP -> get_lines(): $data was ""
2014-12-14 08:35:58    SMTP -> get_lines(): $str is "220 SIXPR03CA015.outlook.office365.com Microsoft ESMTP MAIL Service ready at Sun, 14 Dec 2014 08:35:58 +0000
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data is "220 SIXPR03CA015.outlook.office365.com Microsoft ESMTP MAIL Service ready at Sun, 14 Dec 2014 08:35:58 +0000
                                         "
2014-12-14 08:35:58    SERVER -> CLIENT: 220 SIXPR03CA015.outlook.office365.com Microsoft ESMTP MAIL Service ready at Sun, 14 Dec 2014 08:35:58 +0000
2014-12-14 08:35:58    CLIENT -> SERVER: EHLO 120.27.30.188
2014-12-14 08:35:58    SMTP -> get_lines(): $data was ""
2014-12-14 08:35:58    SMTP -> get_lines(): $str is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $str is "250-SIZE 78643200
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $str is "250-PIPELINING
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $str is "250-DSN
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $str is "250-STARTTLS
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-STARTTLS
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-STARTTLS
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $str is "250-8BITMIME
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-STARTTLS
                                         250-8BITMIME
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-STARTTLS
                                         250-8BITMIME
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $str is "250-BINARYMIME
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-STARTTLS
                                         250-8BITMIME
                                         250-BINARYMIME
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-STARTTLS
                                         250-8BITMIME
                                         250-BINARYMIME
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $str is "250 CHUNKING
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-STARTTLS
                                         250-8BITMIME
                                         250-BINARYMIME
                                         250 CHUNKING
                                         "
2014-12-14 08:35:58    SERVER -> CLIENT: 250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-STARTTLS
                                         250-8BITMIME
                                         250-BINARYMIME
                                         250 CHUNKING
2014-12-14 08:35:58    CLIENT -> SERVER: STARTTLS
2014-12-14 08:35:58    SMTP -> get_lines(): $data was ""
2014-12-14 08:35:58    SMTP -> get_lines(): $str is "220 2.0.0 SMTP server ready
                                         "
2014-12-14 08:35:58    SMTP -> get_lines(): $data is "220 2.0.0 SMTP server ready
                                         "
2014-12-14 08:35:58    SERVER -> CLIENT: 220 2.0.0 SMTP server ready
2014-12-14 08:35:59    CLIENT -> SERVER: EHLO 120.27.30.188
2014-12-14 08:35:59    SMTP -> get_lines(): $data was ""
2014-12-14 08:35:59    SMTP -> get_lines(): $str is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $str is "250-SIZE 78643200
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $str is "250-PIPELINING
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $str is "250-DSN
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $str is "250-AUTH LOGIN
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-AUTH LOGIN
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-AUTH LOGIN
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $str is "250-8BITMIME
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-AUTH LOGIN
                                         250-8BITMIME
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-AUTH LOGIN
                                         250-8BITMIME
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $str is "250-BINARYMIME
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-AUTH LOGIN
                                         250-8BITMIME
                                         250-BINARYMIME
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data was "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-AUTH LOGIN
                                         250-8BITMIME
                                         250-BINARYMIME
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $str is "250 CHUNKING
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data is "250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-AUTH LOGIN
                                         250-8BITMIME
                                         250-BINARYMIME
                                         250 CHUNKING
                                         "
2014-12-14 08:35:59    SERVER -> CLIENT: 250-SIXPR03CA015.outlook.office365.com Hello [120.27.30.188]
                                         250-SIZE 78643200
                                         250-PIPELINING
                                         250-DSN
                                         250-ENHANCEDSTATUSCODES
                                         250-AUTH LOGIN
                                         250-8BITMIME
                                         250-BINARYMIME
                                         250 CHUNKING
2014-12-14 08:35:59    CLIENT -> SERVER: AUTH LOGIN
2014-12-14 08:35:59    SMTP -> get_lines(): $data was ""
2014-12-14 08:35:59    SMTP -> get_lines(): $str is "334 VXNlcm5hbWU6
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data is "334 VXNlcm5hbWU6
                                         "
2014-12-14 08:35:59    SERVER -> CLIENT: 334 VXNlcm5hbWU6
2014-12-14 08:35:59    CLIENT -> SERVER: bW9vZGxlQGdpbWUuZHVmZS5jbg==
2014-12-14 08:35:59    SMTP -> get_lines(): $data was ""
2014-12-14 08:35:59    SMTP -> get_lines(): $str is "334 UGFzc3dvcmQ6
                                         "
2014-12-14 08:35:59    SMTP -> get_lines(): $data is "334 UGFzc3dvcmQ6
                                         "
2014-12-14 08:35:59    SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2014-12-14 08:35:59    CLIENT -> SERVER: R2ltZTEyMzQ1Njc=
2014-12-14 08:36:03    SMTP -> get_lines(): $data was ""
2014-12-14 08:36:03    SMTP -> get_lines(): $str is "235 2.7.0 Authentication successful
                                         "
2014-12-14 08:36:03    SMTP -> get_lines(): $data is "235 2.7.0 Authentication successful
                                         "
2014-12-14 08:36:03    SERVER -> CLIENT: 235 2.7.0 Authentication successful
2014-12-14 08:36:03    CLIENT -> SERVER: MAIL FROM:
2014-12-14 08:36:03    SMTP -> get_lines(): $data was ""
2014-12-14 08:36:03    SMTP -> get_lines(): $str is "250 2.1.0 Sender OK
                                         "
2014-12-14 08:36:03    SMTP -> get_lines(): $data is "250 2.1.0 Sender OK
                                         "
2014-12-14 08:36:03    SERVER -> CLIENT: 250 2.1.0 Sender OK
2014-12-14 08:36:03    CLIENT -> SERVER: RCPT TO:<xxxx@xxxxx.com>
2014-12-14 08:36:03    SMTP -> get_lines(): $data was ""
2014-12-14 08:36:03    SMTP -> get_lines(): $str is "250 2.1.5 Recipient OK
                                         "
2014-12-14 08:36:03    SMTP -> get_lines(): $data is "250 2.1.5 Recipient OK
                                         "
2014-12-14 08:36:03    SERVER -> CLIENT: 250 2.1.5 Recipient OK
2014-12-14 08:36:03    CLIENT -> SERVER: DATA
2014-12-14 08:36:04    SMTP -> get_lines(): $data was ""
2014-12-14 08:36:04    SMTP -> get_lines(): $str is "354 Start mail input; end with .
                                         "
2014-12-14 08:36:04    SMTP -> get_lines(): $data is "354 Start mail input; end with .
                                         "
2014-12-14 08:36:04    SERVER -> CLIENT: 354 Start mail input; end with .
2014-12-14 08:36:04    CLIENT -> SERVER: Date: Sun, 14 Dec 2014 16:35:56 +0800
2014-12-14 08:36:04    CLIENT -> SERVER: To: "xxx" <xxxx@xxxxx.com>
2014-12-14 08:36:04    CLIENT -> SERVER: From: "xxxx"
2014-12-14 08:36:04    CLIENT -> SERVER: Reply-To: "xxxx"
2014-12-14 08:36:04    CLIENT -> SERVER: Subject: =?utf-8?B?5p2l6IeqU2lZYW7nmoTmlrDmtojmga8=?=
2014-12-14 08:36:04    CLIENT -> SERVER: Message-ID: <27e67eb9ec72fade0bb01bdeb67a25f1@120.27.30.188>
2014-12-14 08:36:04    CLIENT -> SERVER: X-Priority: 3
2014-12-14 08:36:04    CLIENT -> SERVER: X-Mailer: PHPMailer Moodle 2014111001 (https://github.com/PHPMailer/PHPMailer/)
2014-12-14 08:36:04    CLIENT -> SERVER: MIME-Version: 1.0
2014-12-14 08:36:04    CLIENT -> SERVER: Content-Type: text/plain; charset=UTF-8
2014-12-14 08:36:04    CLIENT -> SERVER: Content-Transfer-Encoding: 8bit
2014-12-14 08:36:04    CLIENT -> SERVER:
2014-12-14 08:36:04    CLIENT -> SERVER:
2014-12-14 08:36:04    CLIENT -> SERVER: test5
2014-12-14 08:36:04    CLIENT -> SERVER:
2014-12-14 08:36:04    CLIENT -> SERVER: ---------------------------------------------------------------------
2014-12-14 08:36:04    CLIENT -> SERVER: 这封邮件是"Test
2014-12-14 08:36:04    CLIENT -> SERVER: site”上发给您的消息的副本。到http://120.27.30.188/moodle/message/index.php?user=4&id=3回复
2014-12-14 08:36:04    CLIENT -> SERVER:
2014-12-14 08:36:04    CLIENT -> SERVER: .
2014-12-14 08:36:09    SMTP -> get_lines(): $data was ""
2014-12-14 08:36:09    SMTP -> get_lines(): $str is "550 5.7.1 Client does not have permissions to send as this sender
                                         "
2014-12-14 08:36:09    SMTP -> get_lines(): $data is "550 5.7.1 Client does not have permissions to send as this sender
                                         "
2014-12-14 08:36:09    SERVER -> CLIENT: 550 5.7.1 Client does not have permissions to send as this sender
2014-12-14 08:36:09    SMTP ERROR: DATA END command failed: 550 5.7.1 Client does not have permissions to send as this sender
2014-12-14 08:36:09    SMTP Error: data not accepted.

Error calling message processor email

    line 118 of /lib/classes/message/manager.php: call to debugging()
    line 82 of /lib/classes/message/manager.php: call to core\message\manager::send_message_to_processors()
    line 229 of /lib/messagelib.php: call to core\message\manager::send_message()
    line 2185 of /message/lib.php: call to message_send()
    line 184 of /message/index.php: call to message_post_message()

評比平均分數: -
In reply to Si Yan

Re: Email SMTP send as permission error

Colin G發表於

What are your smtp settings in Administration > Site administration > Plugins > Message outputs > Manage message outputs ?

In reply to Colin G

Reply:Moodle in English: Re: Email SMTP send as permission error

Si Yan發表於

I think the problem is because of this:
http://technet.microsoft.com/en-us/library/dn554323%28v=exchg.150%29.aspx
I don't understand it.
However, when I changed the mail server to another one from office365, this happened.
 
SMTP -> get_lines(): $data was ""
2014-12-15 15:13:22	SMTP -> get_lines(): $str is "553 Mail from must equal authorized user
                   	                  "
2014-12-15 15:13:22	SMTP -> get_lines(): $data is "553 Mail from must equal authorized user
                   	                  "
2014-12-15 15:13:22	SERVER -> CLIENT: 553 Mail from must equal authorized user
2014-12-15 15:13:22	SMTP ERROR: MAIL FROM command failed: 553 Mail from must equal authorized user
2014-12-15 15:13:22	The following From address failed: xxx@xxx.com : MAIL FROM command failed,553,Mail from must equal authorized user

I think Moodle's Email function needs to be debuged. This function is the only problem I faced that I can not solve but critical. I hope we can put more resources on it.
Thanks.




In reply to Si Yan

Re: Reply:Moodle in English: Re: Email SMTP send as permission error

Colin G發表於

Why dont you use your local smtp server instead of the remote microsoft one ?

In reply to Si Yan

Re: Reply:Moodle in English: Re: Email SMTP send as permission error

Andrew Mitchell發表於

We have recently experienced the same problem with slightly different error code, however still pertaining to the user not being equal to the from and / or the permission error in your first post. 

After a couple of days in discussion with Microsoft support they looked at the smtp server logs and found an "Envelope" as part of what moodle generated to the serve that contained a different "From:" than the authorized / authenticated user that is named as the SMTP username at:

Site Administration --> Plugins --> Message Outputs --> email

The From in the Envelope was in fact the Support email found at:

Site Administration --> Server--> Support Contact

As soon as BOTH were the same e-mail address the SMTP relay to SMTP.Office365.com on port 587 worked without a problem.

Hope this helps.

AGMNS2

評比平均分數:Useful (5)
In reply to Andrew Mitchell

Re: Reply:Moodle in English: Re: Email SMTP send as permission error

Justin Powell發表於

Thank you!  I had been banging my head trying to get SMTP to work and this was the problem.  I appreciate you taking the time here to read and respond to questions so that others can gain some of the knowledge that you have.


Justin

In reply to Justin Powell

Re: Reply:Moodle in English: Re: Email SMTP send as permission error

srini O發表於
After changing the email addresses also, i am facing this problem yet.
Am also getting the same error smtp error message.

Srini
In reply to Andrew Mitchell

Re: Reply:Moodle in English: Re: Email SMTP send as permission error

Johnny Zghaib發表於

Thank you for your post, as soon as i changed the email in the settings, and both emails were identical, email started flowing. 

but this should be raised as bug, it is so misleading.

In reply to Johnny Zghaib

Re: Reply:Moodle in English: Re: Email SMTP send as permission error

Christian Wurzer發表於

I had the same error. 

My solution: Did the things that are dexcribed above + added a check to emailonlyfromnoreplyaddress in the mailsettings.

In reply to Christian Wurzer

Re: Reply:Moodle in English: Re: Email SMTP send as permission error

Manila Bhalla發表於

Yes right, this solution works. Make sure that the email in EMAIL settings, Server Support Contact and admin ID is the same. Also Check the option emailonlyfromnoreplyaddress  in the email settings. 


Make sure that sendmail() functions works and so is the service on the server. 

In reply to Manila Bhalla

Re: Reply:Moodle in English: Re: Email SMTP send as permission error

Pedro Barroso發表於

Thank you to you all

This works with the checkbook on the noreply

In reply to Andrew Mitchell

Re: Reply:Moodle in English: Re: Email SMTP send as permission error

Miki Alliel發表於
Translators的相片

It works but when we set the "forum_replytouser" parameter it dosn't work.

we get this:

SMTP; Client does not have permissions to send as this sender 2017-SMTP ERROR: DATA END command failed: 
SMTP Error: data not accepted. Error: lib/moodlelib.php email_to_user(): SMTP Error: data not accepted.SMTP server error: DATA END command failed

How can we make it work by letting students reply to their teachers. from their own email account?

it is very important to have this function and it's not working.


we even  unchecked the "forum_replytouser" and put manually in "message\output\email\message_output_email.php file "  line 85~

replyto =$eventdata->userfrom->email;

or

replyto =$eventdata->userfrom;

then sending the message - students get the email but when clicking on reply (in his own gmail account) they can't see the teacher's address but only the support email address of the site.  傷心

very frustrating

Any help please?