Show More
@@ -30,6 +30,7 b' import os' | |||
|
30 | 30 | import re |
|
31 | 31 | import sys |
|
32 | 32 | import shutil |
|
33 | import socket | |
|
33 | 34 | import tempfile |
|
34 | 35 | import traceback |
|
35 | 36 | import tarfile |
@@ -782,3 +783,18 b' def generate_platform_uuid():' | |||
|
782 | 783 | except Exception as e: |
|
783 | 784 | log.error('Failed to generate host uuid: %s', e) |
|
784 | 785 | return 'UNDEFINED' |
|
786 | ||
|
787 | ||
|
788 | def send_test_email(recipients, email_body='TEST EMAIL'): | |
|
789 | """ | |
|
790 | Simple code for generating test emails. | |
|
791 | Usage:: | |
|
792 | ||
|
793 | from rhodecode.lib import utils | |
|
794 | utils.send_test_email() | |
|
795 | """ | |
|
796 | from rhodecode.lib.celerylib import tasks, run_task | |
|
797 | ||
|
798 | email_body = email_body_plaintext = email_body | |
|
799 | subject = 'SUBJECT FROM: {}'.format(socket.gethostname()) | |
|
800 | tasks.send_email(recipients, subject, email_body_plaintext, email_body) |
General Comments 0
You need to be logged in to leave comments.
Login now