4

I have a page blocked by a login module, and I have the "Forgot my password" link etc .. I want to send a copy of the send e-mail to an other email.

For example. User1 lost his password, he click on the "Forgot my password" link, so he receive an mail with a token .. But I want to receive it too, How can I do this ? Is there an option in the module ? Thank you :)

2

I've had a look and you may want to check out the following files;

root/lib/components/com_users/models/remind.php

and

root/lib/components/com_users/models/reset.php

You should be able to add your own email in as a CC there, with something like

$mailer->addCC("carboncopy@yourdomain.com")

Although according to the official documentation if there are multiple recipients, you would put each recipient's email address in an array, as below;

$recipient = array( 'person1@domain.com', 'person2@domain.com', 'person3@domain.com' );

$mailer->addRecipient($recipient);

The official documentation shows you how to send an email from a component.

I must say I haven't had the chance to try this although I can't imagine it's very difficult, perhaps somebody else can help you with the rest of the code?

Hopefully this points you in the right direction.

0

One option is to use something like CMandrill to send all messages through the Mandrill service (free for the first 12,000 messages). Doing it this way lets you view bounces, opens, copies of messages, etc. It won't email you a copy, but it will let you view EVERYTHING going out of the site.

  1. Sign up for Mandrill at Mandrillapp.com
  2. Install the CMandrill extension
  3. Configure CMandrill in your site and enter the API code from Mandrill.com

There's probably another way to do what you're asking, but I wanted to post this as an option in case it interests someone. Feel free to not check it off as the approved answer if someone posts a better one :)

  • Yeah i wanted a more useful thing, and also FREE, I'm not doing this for my personnal website, it's for a company so I'll need more than 12 000 I guess .. Thank you ! – Nicolas Charvoz Sep 4 '14 at 13:33
  • Well, if you don't go over 12,000 emails a month through it, it's free. The extension is free too. The issue is, does the site itself generate more than that (receipts, sign ups, resets, etc). If so, then yeah, you won't want it. – Brian Peat Sep 4 '14 at 14:23
  • Yeah I think it'll be more .. – Nicolas Charvoz Sep 4 '14 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.