Skip to Content Skip to Menu

Send uploaded file from registration form to admin

  • kommid
  • kommid
  • ONLINE
  • Posts: 71
  • Thanks: 12
  • Karma: 0
1 day 6 hours ago #340877 by kommid
I have a site, where only eployees of a certain company may register and I need to check if users, that register to my sites are eligible to do so. So I check their email address: If they have an email address at the said  company, they are eligible, and the registration goes as usual. If they use a different email address, I display a file field, where they are supposed to upload a document, that proves, that they are employees for the company in question.
So far, this works fine, but I also need to send an email with the uploaded file attached to it to an admin, and after sending the email, I need the file to be deleted.
For sending the file, I tried to configure an auto action, which didn't work (maybe I do it wrong?) and for deleting the file after sending it, i hav no clue on how to do this. Does anyone have tips on how I could go about this?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 49058
  • Thanks: 8386
  • Karma: 1457
1 day 4 hours ago #340878 by krileon
So you need to send that file as an attachment to the email? Believe that should be doable. Below should send an email after a user registers.

Global
Triggers: onAfterUserRegistration
Type: Email
Conditions
Field: SELECT_FILE_FIELD_HERE
Operator: Not Empty
Action
To: YOUR_EMAIL_ADDRESS_HERE
Subject: Registration Verification
Body: [username] is attempting to register and requires verification.
Attachment: images/comprofiler/plug_cbfilefield/[user_id]/[var1_FILE_FIELD_NAME_HERE]

Replace FILE_FIELD_NAME_HERE with the name of your field. Once you've this confirmed working for you we can move on to trying to delete it after the email is sent.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: kommid

Please Log in or Create an account to join the conversation.

  • kommid
  • kommid
  • ONLINE
  • Posts: 71
  • Thanks: 12
  • Karma: 0
12 hours 22 minutes ago #340881 by kommid
ok, this worked like a charm, I was close, but I didn't take the path to the file into account....

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 49058
  • Thanks: 8386
  • Karma: 1457
6 hours 10 minutes ago #340886 by krileon
Great! If you're still needing to automate deleting of the files after it sends the email that's also possible, but if for whatever reason you don't get the email it may result in the file being lost for a resend. I'm not sure what kind of review or approval process you have, but if it requires visiting their profile I'd recommend just deleting the file at that point.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • kommid
  • kommid
  • ONLINE
  • Posts: 71
  • Thanks: 12
  • Karma: 0
6 hours 5 minutes ago #340887 by kommid
That's a good point, I'm not sure either, since the customer wasn't very detailed about the requirements. Let me check this, before we go ahead :)

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum