views:

53

answers:

2

Hi there,

I'm upgrading a drupal website. There are thousands of users and it is using messaging and notifications. By accident I have sent out loads of notifications to users. Is there any way I can prevent the emails going out to users and still carry out my upgrades? I don't want to disable the modules as I need them enabled to do the upgrades.

Any help appreciated

+2  A: 

If you mean to temporarily disable/reroute mails on a test/staging instance of your site, take a look at the various options provided in this post.

If you are talking about a live site, be careful - those methods mostly apply to all mails send by Drupal, so you would also disable other mails like e.g. a 'reset password' request.

Henrik Opel
Hi Henrik, thank you very much for your answer, the reroute email module mentioned in the post sounds perfect for my needs. I wanted to disable mailing while I did the upgrades. Ben
Ben
A: 

Usually in Drupal, mail is sent out instantaneously to the mailserver. In some situations, people setup queues in Drupal to send mail. These mails are then sent out from the queue (maybe 50 to 100 at a time for example) when the cron.php runs.

Are you using any of these modules (or similar ones)?

http://drupal.org/project/queue_mail

http://drupal.org/project/mailq

If you are, then you might be able to "empty" the queue for any pending emails.

In general, you can make sure that mails are not sent by blocking the smtp port (usually port 25) on your computer while you are doing an upgrade. You can easily block the port by making a temporary firewall rule.

There might be also be a queue on your mailserver. So you might be able to go to the webserver and delete any pending emails that have not been sent out yet.

Sid NoParrots
Thank you for your answer. I maybe didn't explain myself clearly. I wanted to disable sending out any messaging/notifications while I carried out testing and upgrades. Henrik has answered me above.
Ben