Get user email address

Post Reply
compendio
Member
Posts: 22
Joined: Tue Feb 28, 2012 9:45 am

Get user email address

Post 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
freddyp
Advanced member
Posts: 413
Joined: Thu Feb 09, 2012 3:53 pm

Get user email address

Post 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
compendio
Member
Posts: 22
Joined: Tue Feb 28, 2012 9:45 am

Get user email address

Post 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
compendio
Member
Posts: 22
Joined: Tue Feb 28, 2012 9:45 am

Get user email address

Post 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
dkelly
TOP CONTRIBUTOR
Posts: 628
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Get user email address

Post 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.
compendio
Member
Posts: 22
Joined: Tue Feb 28, 2012 9:45 am

Get user email address

Post by compendio »

Sounds great! Is it a component that you sell?
compendio
Member
Posts: 22
Joined: Tue Feb 28, 2012 9:45 am

Get user email address

Post 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
freddyp
Advanced member
Posts: 413
Joined: Thu Feb 09, 2012 3:53 pm

Get user email address

Post 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
Post Reply