Page 1 of 1

Get user email address

Posted: Sat May 03, 2014 10:06 pm
by compendio
I'm looking for a way to get the users email address by script.



What I do:

I'm placing PDF files into a folder named D:/SwitchInput/FlowName/UserName for every user who uses the workflow. I get the files by the Submit hierarchy. Later in the flow, the Pitstop Server element will check the PDF and in case of an error, the report should be send by email to the user. The folder /UserName is equal to the user in Switch. Is there a way to get the email address of the user by script? Or is there another way to have access to the users email address? Switch client will be an alternative, but I prefere the way as above.



Thanks for any response and best regards,

Thomas

Get user email address

Posted: Mon May 05, 2014 6:12 pm
by freddyp
How many users are we talking about? If the list is not that big then add as many input folders as you have users and on every folder you set the "Attach email addresses" to the correct mail address. This does not require any scripting.



Do these users also use SwitchClient? If they do not, then you would be better off keeping the name/mail correspondences in a separate file and read it with a script. You specifically asked for a script-based solution.



If you have the Database Module you could theoretically access the user database directly, but you will not need a suitable ODBC driver for an SQLite database.



Freddy

Get user email address

Posted: Sun May 11, 2014 9:17 pm
by compendio
Hi Freddy,



Thanks for your reply.



The Switch Client isn't efficent enought, the number of documents is high and the user will work with different flow. Everytime searching the Folder, changing the flow etc. isn't a way.



Thanks for the hint about the direct database access. I haven't already the database module licensed, but will do if I have the Need for that.



Actually I ended up in configuring the email info in the Submit hierarchy configurator to get a quick solution. Later on, I'll use an XML file like in other flows to do the configuration, adding a new user/email address and submitting to the Switch Server will be done by the power user. That way we don't have to stop the flow and the configuration is dynamic. I already use this for FTP connnection Parameters or Metadata fields for Switch Client.



Thanks and best regards,

Thomas

Get user email address

Posted: Sun May 11, 2014 9:19 pm
by compendio
Forgot something:

The files will be sent to the folder by a batch file and the SentTo links in Windows. I'm 10 times faster than Switch Client that way...



Best regards,

Thomas

Get user email address

Posted: Mon May 12, 2014 3:51 pm
by dkelly
We developed a custom Windows Explorer extension that allows a user to select one or more files or directories and select which Switch flow they should be submitted to.

Get user email address

Posted: Tue May 13, 2014 9:13 pm
by compendio
Sounds great! Is it a component that you sell?

Get user email address

Posted: Wed May 14, 2014 7:46 am
by compendio
@Freddy

Would you use http://www.ch-werner.de/sqliteodbc/ or which one would be your first choice?



Thanks and best regards,

Thomas

Get user email address

Posted: Wed May 14, 2014 3:57 pm
by freddyp
It would not be my first choice because I am on OS X :) Give it a try, but make sure to use the 32-bit version!



Freddy