Error sending password change confirmation email

Good afternoon, I have recently set up a brand new installation of Moodle 2.6 on an AMHosting (www.amhosting.com) hosting account.

Good afternoon, I have recently set up a brand new installation of Moodle 2.6 on an AMHosting (www.amhosting.com) hosting account.

I’ve installed a number of previous versions of Moodle on other hosts without issue. This version seemed to install perfectly fine however moodle seems to be unable to send any emails (e.g. password forget / change emails, or the emails that are sent to students when they use self enrollment.

The error I get is the ‘Error sending password change confirmation email as is explained here http://docs.moodle.org/26/en/error/moodle/cannotmailconfirm

It recommends

If you are an Administrator

  • Please Check that SMTP server is correctly set.
  • Ensure that SMTP server is able to send emails.

Can anyone point me in the direction of the page where I set the outgoing SMTP settings in this version of moodle? Is it the ones at…

Site Administration > Plugins > Message Outputs > Email

Or is there somewhere else I should be looking?

Thanks in advance

David

That’s the place. 

Most mail problems stem from some sort of access control. Can the box on which your Moodle sits send email through the server you specify? Check your firewall rules etc. 

Average of ratings: Useful (1)

Hi Howard. Thank you very much for this. I made all the necessary changes and still strangely it wasn’t sending emails. I then turned on debugging, tried again and noticed the error message being returned was that my emails were being blocked from being sent because the ‘sender’ was a non local email account. This was annoying because the settings on this page WERE a local email account. So I wondered if there was anywhere else in Moodle that I might have accidentally used the non local email address that it was saying I was using and sure enough I found a setting in

Site Administration > Server > Support contact

That was using my other email address. Fixed that and emails started going out.

Just mentioning all this in case it helps someone else. I guess it was mostly host server related but also helps if you turn on debugging and find out where its getting stuck smile Thanks for you help.

Can you please clarify as to which two email id must be same, one is the id in server -> support contact and other one?

Main administrator’s Email ID for Moodle, which usually when you install Moodle, is asked when creating first/main admin account.
Also, importantly I do admire you searching for issues in forums rather than starting a new thread, makes you an ideal community member, but, when it comes to additional questions to be asked, do always look out for the date of the thread, if it is more than few months old, better start your new thread giving reference to old one.

Average of ratings: Useful (1)

Both the email ID’s are same yet issues remain intact. I will try recheck everything again, and will get back to the forum.

And Thanks!! Will keep your words in mind smile

Average of ratings: Useful (1)

Good day,

I have successfully overwriting 3 of the default Djoser templates and can receive those emails, but I can’t get the «Password Changed Confirmation» email to send.

According to djoser/conf.py, djoser/email.py, and djoser/templates/email it appears I am doing everything correctly. But it’s not obvious why this one isn’t sending as there are no errors being raised.

The project directory has these relevant files and paths:

project
  - core
    - email.py
    - settings.py
  - templates
    - email
      - activation.html                    # works
      - confirmation.html                  # works
      - password_changed_confirmation.html # does not work
      - password_reset.html                # works

settings.py was set as per the Djoser docs.

DJOSER = {
    'LOGIN_FIELD': 'email',
    'USER_CREATE_PASSWORD_RETYPE': True,
    'SET_PASSWORD_RETYPE': True,
    'SEND_ACTIVATION_EMAIL': True,
    'ACTIVATION_URL': 'activate/{uid}/{token}',
    'SEND_CONFIRMATION_EMAIL': True,
    'PASSWORD_RESET_CONFIRM_URL': 'password/reset/confirm/{uid}/{token}',
    # I set this to True as per the docs:
    'PASSWORD_CHANGED_EMAIL_CONFIRMATION:': True,
    'USERNAME_RESET_SHOW_EMAIL_NOT_FOUND': True,
    'PASSWORD_RESET_SHOW_EMAIL_NOT_FOUND': True,
    'SERIALIZERS': {
        'user_create': 'users.serializers.UserCreateSerializer',
        'user': 'users.serializers.UserCreateSerializer',
    },
    'EMAIL': {
        # These 3 templates send:
        'activation': 'core.email.ActivationEmail',
        'confirmation': 'core.email.ConfirmationEmail',
        'password_reset': 'core.email.PasswordResetEmail',
        # This one does not:
        'password_changed_confirmation': 'core.email.PasswordChangedConfirmationEmail',
    }
}

In email.py I create my custom class to reference the template. The print statements don’t even fire so I don’t think this is even getting called.

from djoser import email

# Override the default Djoser confirmation email.
class PasswordChangedConfirmationEmail(email.PasswordChangedConfirmationEmail):
    template_name = 'email/password_changed_confirmation.html'

    def send(self, to, *args, **kwargs):
        print(f"Sending password changed mail to {to}")
        try:
            super().send(to, *args, **kwargs)
        except:
            print(f"Couldn't send mail to {to}")
            raise
        print(f"Password changed mail sent successfully to {to}")

Sending a reset password POST request yields the following (expected) messages in the console:

Sending password reset mail to ['someone@somewhere.com']
Password reset mail sent successfully to ['someone@somewhere.com']
[25/Apr/2022 13:53:56] "POST /api/v1/users/reset_password/ HTTP/1.1" 204 0

I then go to the URL it provides and send a POST request with the provided uid and token successfully to the reset_password_confirm end-point.

[25/Apr/2022 14:13:33] "POST /api/v1/users/reset_password_confirm/ HTTP/1.1" 204 0

I can successfully change the password, but there aren’t any print statements from that PasswordChangedConfirmationEmail class and no email received.

What am I doing wrong here?

Any help would be appreciated, thank you.

Back to Top

Sometimes email falls through the cracks and doesn’t make it to your inbox. We do not have the resources to troubleshoot each individual mail problem, but we can give you general guidelines to help.

As of this writing, there are no bugs related to sending mail in Trello. This means that once the email is sent from our servers, we don’t know what happens to it. We’ve passed on the email and trust that your mail server will deliver it to you.

Emails from Trello and Atlassian

All emails from Trello and Atlassian will have a From header with one of the following email addresses:

  • do-not-reply@trello.com

  • invitation-do-not-reply@trello.com

  • username-noreply@trellobutler.com

  • noreply@am.atlassian.com

  • atlassian-support@am.atlassian.com

  • noreply+a62f551e5f583d63a42c2b0f82f80107c76a09f7d17d5d40466f2323@am.atlassian.com (Note: the token will be randomly generated)

The following other email headers are also used:

  • Return-Path: @spemail.trello.com, e.g. bounces.notification+user=domain.com@spemail.trello.com

  • Reply-To: @boards.trello.com, e.g. user+4d713bcb37a18a4697f+53e3d3ee31b131f05bf+8f1b94b27e@boards.trello.com

You might consider adding these domains to your address book and/or asking your network administrator to allow them.

If you’re using a public email tool (such as Hotmail, Gmail, Outlook.com, etc.) and are having trouble receiving your confirmation email, try adding do-not-reply@trello.com and noreply@am.atlassian.com to your contacts list.

Check SPAM Locally and on the Network

Emails from Trello and Atlassian can get caught in SPAM filters. Check the SPAM folder in your email inbox to see if it’s there. If it’s not in your local SPAM folder, ask your network administrator if the message might be blocked at the network level. Our support team can provide more information on what IP addresses to allow.

Resend Confirmation Emails

If you are not using Trello with an Atlassian account: You can have Trello resend a confirmation email by going to https://trello.com/resendValidate. Note: you must be logged into your Trello account to resend the confirmation email. You should receive a message immediately that the email was sent. The email will originate from do-not-reply@trello.com.

If you are using Trello with an Atlassian account: Please contact Trello Support and we’ll check on your account to make sure you can receive emails from us. If necessary, Trello Support will remove the block. Then, log back into your Atlassian account on https://id.atlassian.com and click Resend signup link

  • If you’ve been invited to join your teammates in an Atlassian cloud site, please reach out to your Admin to resend the confirmation email. Alternatively, you can trigger a password reset from https://id.atlassian.com/login/resetpassword to set a password and confirm your account.

Checking with your Administrator

If you’ve tried the recommendations above and still can’t receive emails from Trello and Atlassian, you may need to contact your admin to check if your domain is reachable. Using a tool such as https://toolbox.googleapps.com/apps/checkmx/ can be helpful.

Test Notifications

If you’re already logged in to Trello, you can go to  https://trello.com/test_notifications to test if Trello can send email to you. You should receive a message immediately that the email was sent. The email will originate from do-not-reply@trello.com. 

NOTE: You can only use this method if you are logged in to Trello. This will not work if you are not getting password reset emails.

Lotus Notes Users

Lotus Notes includes a built-in web browser that is not supported by Trello. If you are using Lotus Notes and are having trouble confirming your email address, first resend the email to your account, then copy the confirmation link in the email and open it in a supported browser.

Viewing 8 replies — 1 through 8 (of 8 total)

  • @newbars

    You can verify the UM sending of emails with the “Check & Log Email” plugin.

    Check & Log Email

    Your issue with sending is probably a relay problem where your emails are considered spam. Install and activate a SMTP plugin to solve this issue.

    WP Mail SMTP by WPForms – The Most Popular SMTP and Email Log Plugin

    hi @missveronicatv thanks for the answer, im using that plugin for sending my emails using amazon services and the problem is there, when i search in the log of wp mail smtp i saw that the admil email is sending but the user email isnt

    @newbars

    You can activate the “Account Updated Email” which is being sent on Password Change from Profile Account Page.

    @missveronicatv I have activated that too but for project requirements is necessary that if a user change their password from the Password Reset Page they get a notification on their email, maybe is a bug from the plugin? or i just have to code a function to be send that email?

    @newbars

    I will have a look at the UM core code during the weekend and make a bug report if necessary.

    @newbars

    I have found a bug and the email address supplied by UM for sending the confirmation email about password changed is empty so UM refused to do any sending.

    You can add this code snippet to your child-theme functions.php file or use the “Code Snippets” plugin:

    add_action( 'password_reset', 'um_password_reset_email', 10, 2 );
    
    function um_password_reset_email( $user, $new_pass ) {
    
        um_fetch_user( $user->ID );
    }

    This code snippet will add the user meta values including required email address before asked by the UM email send function.

    I have documented this bug for the UM developers at Github:

    https://github.com/ultimatemember/ultimatemember/issues/936

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂

    Regards,

    For a while my users were getting a your password has been reset message with the closing regards and our site name. Since I didn’t want to get them just because I went into their profile I disabled the wp mail plug-in and it went away. Do you know what part of WordPress uses the wording regards in their confirmation messages

  • Viewing 8 replies — 1 through 8 (of 8 total)

    Как разблокировать аккаунт после 5 неудачных попыток входа

    Как разблокировать аккаунт после 5 неудачных попыток входа

    Наверное, каждый сталкивался с ошибкой при попытке авторизации с не валидными данными, которая по-английски звучит так

    Sorry, there have been more than 5 failed login attempts for this account. It is temporarily blocked. Try again later or request a new password.

    а по-русски

    Аккаунт временно заблокирован по причине более чем 5 неудачных попыток входа. Попробуйте войти позже, или запросите новый пароль.

    Это простая самооборона Друпала, которая активируется после 5 (по умолчанию) попыток входа. Таким образом, система не позволяет злоумышленникам забрутофорсить (англ. brute force. Cм. Полный перебор) сайт. Работает она достаточно просто: во время каждой авторизации, Друпал сохраняет ip-адрес пользователя, запоминая при этом, точную дату события и дату окончания «срока годности» попытки.

    Вот некоторые нюансы:

    • По умолчанию «срок годности» составляет 1 земной час.
    • Количество возможных, неудачных попыток входа — 5.
    • Эти значения могут быть изменены.
    • Вместо ip-адреса может быть сохранено имя хоста.
    • Данные, у которых истек «срок годности» очищаются только по крону.
    • Вы можете войти в систему, в любом случае если пройдете процедуру «Сброса пароля»!

    Вот еще один интересный факт:

    Вы можете имя пользователя указать верно, но при этом 5 раз ошибиться с паролем. В таком случае, попытки авторизации будут запрещены на 6 часов. При этом, через 60 минут можно будет повторить попытку входа, но с другого ip-адреса.

    Что касается простых смертных — мы разобрались. Администраторы, же или программисты могут сталкиваться с этой проблемой чаще, т.к. им хлеб в рот не клади, дай только что-нибудь сломать. К счастью, для тех у кого есть доступ к Драшу или напрямую к базе могут обойтись без сброса пароля или часового ожидания. Нужно просто почистить таблицу flood
    . Вот восемь способов это сделать.

    # Очистить все.
     drush sqlq "DELETE FROM flood"
    ;
    # Снять блокировку для существующего пользователя с id=1.
     drush sqlq "DELETE FROM flood WHERE event = 'failed_login_attempt_user' AND identifier LIKE '1-%'"
    ;
    # Очистить данные для определенного ip адреса.
     drush sqlq "DELETE FROM flood WHERE event = 'failed_login_attempt_user' AND identifier LIKE '127.0.0.1'"
    ;
    # Если вы не имеете установленного Drush, тогда заходим в консоль базы и выполняем запросы "на живую".
     mysql> DELETE FROM flood;
     mysql> DELETE FROM flood WHERE event
    =
    'failed_login_attempt_user'
     AND identifier LIKE '1-%'
    ;
     mysql> DELETE FROM flood WHERE event
    =
    'failed_login_attempt_user'
     AND identifier LIKE '127.0.0.1'
    ;
    

    Проблемы, ошибки, неточности в тексте пишите в комментах.

    Оценка статьи:

    1 звезда2 звезды3 звезды4 звезды5 звезд (пока оценок нет)

    Загрузка…

    HI, I’ve changed my password on my settings. It sent me an email – fine. THERE IS NO LINK IN THE EMAIL. But my account now says the change is PENDING until I click the link. None of the ‘help’ pages help. Can anyone help? Since there aren’t any actual human beings working at WordPress to help clients…

    The site I need help with is kaywritesheretoo.wordpress.com.

    Hi
    I’m trying to subscribe to a WordPress blog. WordPress tells me my email address is not valid (it is. I’ve been using it for almost 20 years). But, just to play the game, I changed my email address within the settings of my own WordPress account. They still say this other email address is not valid (it is, I’ve been using it as my business account for about 15 years).

    Can anyone help? Why is WordPress blocking my perfectly valid email addresses?

    Hi there:

    Please refrain from starting multiple threads with your questions. I’ve merged them together and will respond here: https://wordpress.com/forums/topic/trying-to-change-password-link-not-provided-in-confirmation-email/

    Updating your password when you’re already logged into your account doesn’t send an email, so did you instead change your email address? I’m showing that you changed your account email address earlier today. Were you having problems with your current email address or your previous email? What site were you trying to subscribe to? Once we have that information, we’ll be better able to advise.

    Thanks!

    Kay Leitch <(email visible only to moderators and staff)>
    11:02 (10 hours ago)

    to WordPress.com

    Hi, thanks for your email. I apologise – I did write “password” when I meant “email”. I’m sorry for the confused this caused. This was due in part to my stupidity, and in part to the sheer frustration of trying for hours to get WordPress to consider my emails “valid” when I’ve been using both for over a decade.

    Here is the problem: I am registered with WordPress as kaywritesheretoo.wordpress.com (I’m also registered, separately, as part of electrikinc.wordpress.com). WordPress has always refused to accept my personal email address and so I have had to use one specially set up for WordPress.
    I am trying to subscribe to: http://www.pamgrout.com

    Whenever I try to subscribe to this, using either my valid personal email address, or my valid business email address, WordPress gives me this message:

    Your subscription did not succeed, please try again with a valid email address.

    This is confusing because both my email addresses are completely valid. I seldom look at the email address especially set up for WordPress but I thought that might be the problem, so I decided to try and change it to my personal email account which I use every day. When I tried to change my email address on WordPress to my valid personal email, it tells me I can’t change to that email address because it already exists (yes, it does – it’s mine and has been every day for about 20 years).

    Okay, I thought, I’ll try my other – business – email address. So, I tried changing it to that. I finally succeeded though this took a while – which is when I contacted you.

    However, when I try to subscribe to wwwpamgrout.com, WordPress still refuses to accept that email address as “valid”, too…

    The only reason I tried changing my email address was because WordPress refused to accept my personal one (no reason given – and “already in use” is ludicrous when it’s me who is already using it). However, WordPress still gives me the above message whenever I try to subscribe to pamgrout.com with ANY email address. This is what I need help with. Can you help with this? Is there a particular reason 1) why WordPress won’t let me use my own personal email address; and 2) yet still won’t accept any email address I put in for this subscription?

    I look forward to hearing any solutions you may have. Thank you for your time.

    What is the email address you’re trying to subscribe with?

    Jun 30, 2021 at 10:04 am

    #3698813

    Hi, thank you for your message.

    I have tried (email visible only to moderators and staff) (my personal email). WordPress won’t accept it.

    I changed the email address on my WordPress account from (email visible only to moderators and staff) to (email visible only to moderators and staff) (because that is my business email and I use it more often. the kaywriteshere@gmail was only created because WordPress would not accept my personal email address and continues to call it “invalid”.)

    When I tried to subscribe to the site with (email visible only to moderators and staff), WordPress told me that was “invalid” too.

    I’m running out of email addresses…

    Jun 30, 2021 at 11:39 am

    #3698837

    Hi there,

    You cannot change it to your personal email as that address is associated with another account.

    Can you please share the complete error message you’re getting when you try to follow that site? If you prefer to grab a screenshot you can quickly do it with https://snipboard.io/

    Hi, thanks for getting back to me. I believe the other account my personal email address is associated with is an old one I may have started many years ago and have lost the details for. Is there any way to check that?

    In the meantime, here is a screenshot of the message I get when I try to use my email address: (email visible only to moderators and staff) to subscribe to PamGrout.com

    /Users/Leitch/Desktop/Screenshot 2021-06-30 at 17.14.33.png

    We can’t see screenshots stored on your computer.

    Would you please use https://snipboard.io to share that instead?

    As for accessing the old account, we have some options for you at https://wordpress.com/support/account-recovery/

    Hi – apparently my Mac does not support that software and says it cannot take a copy of the screen using your link unless I upload Chrome, Firefox or IE, which I’m loathe to do because of their appalling reputation for data mining.

    So – I’m not sure what we do now? Your software can’t read normal screenshots and my Mac won’t accept your uploading suggestions. The message I get from WordPress when I try to subscribe (using (email visible only to moderators and staff)) is still: “Your subscription did not succeed, please try again with a valid email address.”

    Can anyone help with this, without seeing a screenshot to prove I’m not telling lies? Any help would be appreciated.

    Hi, just to clarify, we only need the screenshot to see the error message in context; it will give us more details and can help us understand better what’s going on.

    If you’re unable to use the snipboard.io page, try just uploading the screenshot to your site’s media library and let us know. We’ll be able to access it from there.

    Also, just to confirm, you’re trying to subscribe to the site pamgrout.com by typing in your email address to the subscribe widget in the right sidebar, is that right?

    Hi

    Okay, that’s done. Here is a link in case you need it (though I doubt it):
    https://wordpress.com/media/kaywritesheretoo.wordpress.com

    And yes, I’m trying to subscribe in the usual Subscribe button on right sidebar in the box provided on PamGrout’s WordPress blog.

    Thanks.

    Hi there! After extensive testing, thanks to the great information you were able to share with us, I believe we’ve solved this.

    It appears the site itself may have been undergoing some changes (as best we can tell). Those changes appear to have just resolved within the last few minutes.

    Here’s what we recommend you do next:

    1. Clear your web browser’s saved cache: https://wordpress.com/support/browser-issues/#clearing-your-browser-cache

    2. Click this link: https://pamgrout.com

    3. Enter your email address to subscribe.

    It will look like the same process, but it should work this time around, because it worked for us too. :)

    Let us know how it goes.

    Hi! Thankyou! That has worked! I followed your instructions and it subscribed me no problem – thank you very much for your help.

    And now, I’m very sorry, but there seems to be another problem! :( When I cleared the cache history (for cookies), that means I have to sign in everywhere again – that’s fine. All normal.

    BUT when I tried to get into my WordPress account ((email visible only to moderators and staff)), it’s telling me my password is wrong – which is odd because I don’t recall changing it recently. I have now had to come in via another blog we have called (email visible only to moderators and staff). If I hadn’t had that, there is no way of contacting you (or of saying thanks for solving that original problem) because I couldn’t even see a Forgotten Password button that could help.

    Any ideas what I’m doing wrong? (I’m assuming I’m doing something wrong). Is there any way I can reset the password for my blog (email visible only to moderators and staff)?? Sorry to give you more hassle.

    My apologies! Please disregard previous email – I have now managed to get in to my own blog site! (I had missed out a letter in my user name). Sorry for wasting your time.

    But, thanks again for helping solve the original problem.
    Regards, Kay

    Glad to hear you got it sorted out! :)

    Понравилась статья? Поделить с друзьями:
  • Error sending message child exited 127 exec error
  • Error sending message checkout logs alertmanager
  • Error sending message 400 bad request chat not found
  • Error sending key
  • Error sending end of post message to me что это