old_contents: # Copyright 2013 Rooter Analysis S.L.
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #    http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  
  from django.conf import settings
  from django.core.management.base import BaseCommand
  from django.core.mail import send_mail
  
  
  class Command(BaseCommand):
      """send mail test
      """
  
      def handle(self, *args, **options):
          send_mail('Testing mail', 'Here is the message.',
                    settings.DEFAULT_FROM_EMAIL, args)
  
new_contents: # Copyright 2013 Rooter Analysis S.L.
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #    http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  from datetime import datetime
  
  from django.conf import settings
  from django.core.management.base import BaseCommand
  from django.core.mail import send_mail
  
  
  class Command(BaseCommand):
      """send mail test
      """
  
     
      def message(self, message):
          self.stdout.write("%s\n" % message.encode("ascii", "replace"))
  
      def handle(self, *args, **options):
          now = datetime.now()
          body="""
  Hi, this is the testing message
  
  send on %s
  """ % str(now)
  
          self.message(body)
  
          send_mail('Testing mail - %s' % str(now), body,
                    settings.DEFAULT_FROM_EMAIL, args)
  
subject: Change subject to every mail to was sent