Tried to send you an email but failed!

Tried to send you an email but failed!

by Wesam Bhaya -
Number of replies: 7

Hello

I have the problem below, when some new user setup new Moodle account:

The error message 'Tried to send you an email but failed!' is most likely due to an incorrect SMTP server configuration.


and in log, I get:

Action: library mailer,

Information: ERROR: The following From address failed: xyz@xya.com SMTP server error: Sender address is not valid for your login. Check your email program settings.


and I change 

Home  Site administration  Plugins  Message outputs Email   to my own but no thing ocure.


Please, how can I solve this problem

Note, my Moodle is 2.4 version

Regards

Average of ratings: -
In reply to Wesam Bhaya

Re: Tried to send you an email but failed!

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Is *any* email getting sent or is email simply not working?

Have you configured email on your site at all? See - https://docs.moodle.org/27/en/Email_settings#Email_settings

In reply to Howard Miller

Re: Tried to send you an email but failed!

by Alex Walker -
I suspect this is due to Moodle's penchant for sending emails with the 'from' or 'reply to' address set to the sending user's email address.


Some SMTP servers don't like this and throw an error about relaying.

In reply to Alex Walker

Re: Tried to send you an email but failed!

by srini O -

then how can we solve that conflict?

Can you help me to get rid of this?

I am using moodle 2.9 version.

In reply to Wesam Bhaya

Re: Tried to send you an email but failed!

by whitegod k -

Hi Wesam


I think  your application running in local server(localhost),if you run local server that message will be display. you can change to any hosting server.


Thanks

White

In reply to Wesam Bhaya

Re: Tried to send you an email but failed!

by Scott Brim -

I am guessing that you are using an external SMTP relay, you are not using mail transport on the server you are hosting your Moodle on, and that there is a difference between the "inner" and "outer" mail envelope sender. 

If that is not what you want, what did you set "SMTP hosts" to in plugins>message outputs>email? You could set it to "localhost" to try to use the local host.

If it is intentional, see if you can get your remote SMTP relay to allow this difference between the inner and outer envelope. 

You could also try checking "always send email from the no-reply address" and fiddle with the no-reply address, possibly making it the same as your login for the SMTP relay.


In reply to Wesam Bhaya

Re: Tried to send you an email but failed!

by student student -

help me, i have a problem about user create new account error "Tried to send you an email but failed!" .

this is message : 

a

In reply to student student

Re: Tried to send you an email but failed!

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Could be a multitude of things.  Email setup for the site.  Incorrect email address.  Would need a lot more information.