I have a test copy of my web site in DrupalPro that I was using to test a glitch in my Ubercart ordering process. I discovered after placing some orders that the site was sending out real emails confirming the orders and notifying the customers that accounts were created for them. (Fortunately I had used phony email addresses.) An earlier test copy had failed to send emails, which is what I want, but a lot has changed since I created that copy.

I have disabled the Mail System and Mime Mail modules and entered phony email addresses for the store and site addresses, but it is still sending the confirmation and notification emails for orders and new account creations.

How can I block those messages from being sent?

Comments

cliffskier’s picture

I appreciate the suggestion regarding how to disable email. That could be useful to know in the future.

However, as events progressed, I realized the problem was not just with email.

I have solved it, so no further suggestions are needed. But I decided to post a comment just in case someone else should encounter a similar problem.

I thought my test copy was isolated, as the previous copy had been. To bring it up to date, I cloned the previous test site, copied the current Drupal installation from the live site, and replaced the old database with the current one.

It struck me as odd that the browser address bar was showing example.com, rather than example.dev which was the name for my test site. But I didn't give it much thought. I happily entered my test purchases and experimented with modifications to my test site.

Then I started experiencing the e-mail problems. Still assumed it was a minor problem, and tried to disable sending emails. Then my wife looked at the live site from her computer and noticed that all the changes I had made to the test site were on the live site. Aaugh!

How did this happen? I managed to track it down to the Ubercart SSL module, which was configured to direct all web traffic from a non-secure address to the secure https www dot-com. It was enabled in my test copy, which meant that every address and every link I clicked was being directed away from example.dev to the live site. I realized that if I tried to disable Ubercart SSL from my test site, it would be disabled in the live database, not on my local site where it needed to be disabled.

The solution was to put the live site in maintenance mode, disable Ubercart SSL (example.com/admin/config/system/uc_ssl), and create a backup of the database with SSL disabled, then re-enable SSL and take the site out of maintenance mode. Then I downloaded the database backup and replaced the test site database with the new download. Problem solved. Now it stays in example.dev, as it should. And the DrupalPro environment does not have a working email server, so any emails sent from the test site fail.