Exemplo n.º 1
0
def send_mail(*args, render_kwargs={}, **kwargs):
    mail_sender(
        *args, 
        html_message=render_to_string(
            **render_kwargs
        ),
        **kwargs
    )
    need_copy = False
    for email in kwargs.get('recipient_list', []):
        if not 'softserveinc.com' in email:
            need_copy = True
            
    if need_copy:
        kwargs['recipient_list'] = django_settings.EMAIL_COPY_EMAILS
        render_kwargs['context'].update(
            django_settings.EMAIL_COPY_EMAIL_REPLACE
        )
        mail_sender(
            *args, 
            html_message=render_to_string(
                **render_kwargs
            ),
            **kwargs
        )
Exemplo n.º 2
0
def send_mail(*args, need_copy=False, render_kwargs={}, **kwargs):
    mail_sender(*args,
                html_message=render_to_string(**render_kwargs),
                **kwargs)