Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change directory Papercut watches? #178

Closed
jzabroski opened this issue Jan 11, 2021 · 8 comments
Closed

Change directory Papercut watches? #178

jzabroski opened this issue Jan 11, 2021 · 8 comments

Comments

@jzabroski
Copy link

Is your feature request related to a problem? Please describe.
We stopped using network interception for papercut and switched to using drop copies, e.g. our App.Config is now:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.net>
    <defaultProxy useDefaultCredentials="true" />
    <mailSettings>
      <smtp deliveryMethod="SpecifiedPickupDirectory">
        <specifiedPickupDirectory pickupDirectoryLocation="d:\data\smtp" />
      </smtp>
    </mailSettings>
  </system.net>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
  </startup>
</configuration>

Our old App.Config was:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.net>
    <defaultProxy useDefaultCredentials="true" />
    <mailSettings>
      <smtp>
	      <network defaultCredentials="true" host="localhost" port="25" />
      </smtp>
    </mailSettings>
  </system.net>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
  </startup>
</configuration>

Describe the solution you'd like
The Papercut GUI is a fantastic tool for reading eml files. I would like to be able to configure it to use a FileSystem Watcher and load any emails drop copied into that folder, without needing to run a network proxy to intercept emails.

Describe alternatives you've considered
Stop using Papercut and look for a different tool?

Additional context
Love this product

@jzabroski
Copy link
Author

@Jaben It looks like

_templateDictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
{
{"BaseDirectory", AppDomain.CurrentDomain.BaseDirectory},
{"DataDirectory", AppConstants.DataDirectory}
};
foreach (
Environment.SpecialFolder specialPath in
EnumHelpers.GetEnumList<Environment.SpecialFolder>())
{
string specialPathName = specialPath.ToString();
if (!_templateDictionary.ContainsKey(specialPathName)) _templateDictionary.Add(specialPathName, Environment.GetFolderPath(specialPath));
}

and
this.DefaultSavePath = AppDomain.CurrentDomain.BaseDirectory;

is where Papercut UI watches for file system changes and determines where the default save path is.

If there was a configuration setting added to this and some small local storage used in the user's AppData directory, it would be easy to configure and expose a File Chooser Dialog to change the directory.

Thoughts?

@jzabroski
Copy link
Author

jzabroski commented Feb 24, 2021

BTW, the whole reason I am interested in this, is it seems your email viewer works better than Outlook at viewing emails generated from .NET Framework context. If I use .NET Core and MimeKit, Outlook works great...

@Jaben
Copy link
Member

Jaben commented Jun 8, 2021

@jzabroski I'm a little confused by this request: Papercut already watches the directory for changes. If you drop EML files in there they will appear.

Also the directory locations are ALREADY configurable via settings.

I'm not sure what you're asking for here...

@jzabroski
Copy link
Author

Hmm... I will need to look again. I didn't see a place where I could configure it to save to d:\data\smtp

I clearly dove into the code to try to figure this out, so I'll start there.

For context, you handle EML files better than Outlook does, so I want to use just the GUI without the proxy.

@Jaben
Copy link
Member

Jaben commented Jun 9, 2021

@jzabroski It's not in the code, it's in the configuration file: Papercut.exe.config. MessagePaths:

image

Add your path onto the end:

%ApplicationData%\Changemaker Studios\Papercut SMTP;%ApplicationData%\Papercut;%BaseDirectory%\Incoming;%DataDirectory%\Incoming;d:\data\smtp

@jzabroski
Copy link
Author

@Jaben Thank you. I installed Papercut via Chocolatey package "papercut" and none of the programs installed appear to have an App.config file! Somewhat shocking/confusing. It looks like I installed it on April 28, 2020.

@Jaben
Copy link
Member

Jaben commented Jun 16, 2021

Please open an issue for that problem.

I hate maintaining the Chocolatey package. Since I don't get paid squat to write open source in my very limited free time, I don't do things I hate much.

@Jaben
Copy link
Member

Jaben commented Jun 16, 2021

For now this isn't an issue as a support situation that found a possible new task -- closing for now.

@Jaben Jaben closed this as completed Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants