@project_signals.privacy_set_public.connect
def queue_first_public_project_email(user, node, meeting_creation):
 if (not meeting_creation):
  sent_mail = mails.QueuedMail.find(((Q('user', 'eq', user) & Q('sent_at', 'ne', None)) & Q('email_type', 'eq', mails.NEW_PUBLIC_PROJECT_TYPE)))
  if (not sent_mail.count()):
   mails.queue_mail(to_addr=user.username, mail=mails.NEW_PUBLIC_PROJECT, send_at=(timezone.now() + settings.NEW_PUBLIC_PROJECT_WAIT_TIME), user=user, nid=node._id, fullname=user.fullname, project_title=node.title)

@ project_signals . privacy_set_public . connect def queue_first_public_project_email ( user , node , meeting_creation ) : if ( not meeting_creation ) : sent_mail = mails . QueuedMail . find ( ( ( Q ( 'user' , 'eq' , user ) & Q ( 'sent_at' , 'ne' , None ) ) & Q ( 'email_type' , 'eq' , mails . NEW_PUBLIC_PROJECT_TYPE ) ) ) if ( not sent_mail . count ( ) ) : mails . queue_mail ( to_addr = user . username , mail = mails . NEW_PUBLIC_PROJECT , send_at = ( timezone . now ( ) + settings . NEW_PUBLIC_PROJECT_WAIT_TIME ) , user = user , nid = node . _id , fullname = user . fullname , project_title = node . title )
queue and email after user has made their first non-osf4m project public .