#NEWLINE# def activate_user_notification( user_db ) : #NEWLINE# #INDENT# if ( not user_db . email ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# user_db . token = util . uuid ( ) #NEWLINE# user_db . put ( ) #NEWLINE# to = user_db . email #NEWLINE# body = ( "Welcome to %(brand)s.\n\nFollow the link below to confirm your email address and activate your account:\n\n%(link)s\n\nIf it wasn't you, we apologize. You can either ignore this email or reply to it\nso we can take a look.\n\nBest regards,\n%(brand)s\n" % { #NEWLINE# #INDENT# 'link' : flask . url_for ( 'user_activate' , token = user_db . token , _external = True ) , #NEWLINE# 'brand' : config . CONFIG_DB . brand_name , #NEWLINE# #UNINDENT# } ) #NEWLINE# flask . flash ( 'An activation link has been sent to your email address.' , category = 'success' ) #NEWLINE# send_mail_notification ( 'Activate your account' , body , to )