[development] Prevent sending emails with hook_mail_alter() in d6?

Earnie Boyd earnie at users.sourceforge.net
Thu Mar 15 14:02:27 UTC 2012


On Thu, Mar 15, 2012 at 9:25 AM, Mario Schnauss <mario.schnauss at unic.com> wrote:
> Hi Earnie,
>
> I set $messages['send'] to false, but it had no effect. drupal_mail() does differ in d6 and d7 in that case, so i think that won't work. Is there any other chance to stop mails that are already initialized with drupal_mail()?
>

Ah, yea, I see the difference now.  There was obviously a ticket to
resolve the issue that was not back ported to D6, you could try
looking for that.  The only other options, make sure the $send
parameter to drupal_mail is set to FALSE or modify the core code for
drupal_mail to add the bits after ``if ($send) {'' that are present in
D7.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd


More information about the development mailing list