from .ses_send_email import send_email def send_welcome_email( template_type, recipient_email, recipient_name, message=None, temp_passwd=None, inviter_email=None, ): # default template params template_params = { "name": recipient_name, "inviter_email": inviter_email, "user_email": recipient_email, "temp_passwd": temp_passwd, "message": message, } attach_images = [] email_params = { "sender": '"FanSifter" ', "recipients": recipient_email, "subject": "Welcome to Fansifter!", } if template_type == "welcome": template_file = "fansifter-email-templates/Welcome/welcome.html" attach_images.append( {"name": "fansifter-email-templates/Welcome/g14.png", "cid": "g14_png"} ) else: raise RuntimeError(f"unknown Welcome email template: {template_type}") send_email(template_file, template_params, email_params, attach_images)