1

I'm using flag_friend module and want to customize the email that is sent after a friend request is made.

What's the best way developing code for email functions like this where you can't just reload the page to see your changes?

I would have to go back, remove the friend request and create a new request to trigger the next email, then wait for the email to arrive.

1 Answer 1

3

You could write an automated test with SimpleTest.

Takes quite a bit of initial effort but once you have it, it is a matter of a few seconds to re-run your test.

Simpletest also automatically intercepts sent mails and you can then get them directly in the test with $this->drupalGetMails().

See for example How do I write automated tests for a Drupal site?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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