Overwriting registration mails

  • Hi everybody,

    I would like to personalise the mails sent to users during registration (and when resetting password).

    I can overwrite the views on the screen during these actions, but I am unabled to change the emails contents.

    I think this is done inside the controler with this type of function :

    It calls the PHP file in the mails folder of the user module.

    If I have well understood, it calls the mails/xxx.php file in the system/user folder and can't be overwriting.

    I could change these files, but I would prefer to overwrite it in my theme.

    Is there a way to do this ? Perhaps overwriting this function in the controllers ? But I don't know how to do that.

    Thanks for help.

    Best regards.

    Jean-Francois Huet


  • Hi Tobbe

    Thanks for your reply.

    Yes, I can customize the views in my theme, but it is what is displayed on the screen during registration.

    What I would like to do is to customize the mails sent to the user during the different phases of registration.

    If I have unterstood well, the mails are defined in the /app/system/modules/user/mails folder and they are called from the controllers, with functions as sendWelcomeEmail($user) or other sendXxxxxxEmail($user).

    I think I can't overwrite the controllers to redefine the sendXXEmail functions.

  • Oh, sorry. I did not see that the app is missing the "view" prefix. So I have no idea how to solve this at the moment.

    But instead of overwriting the controllers I would overwrite the templates. If you want to keep them after an update you can try to write an extension to set them automatically after a new update was installed. That's the only thing I can imagine at the moment.