Open rach opened 9 years ago
Sounds like a good change.
Just discovered the same.
+1 for adding the change.
This issue affects me. DebugMailer tries to use a directory that doesn't exist and that I don't have permissions to create to.
Currently the only way to change which directory it uses is to modify the source code directly as I do not have direct control over which directory my project is sitting in due to its deployment configuration.
PRs are gladly accepted and are more effective than +1s and me-toos.
@rach please do provide a PR.
I would imaging that tests for the feature will need to do some tempfile.mkdtemp
jiggery-pokery for portability. See: https://github.com/Pylons/pyramid_mailer/blob/master/pyramid_mailer/tests/test_mailer.py#L14 for a start.
Sorry for the lack of answers, I missed the previous github messages. I will try to fix that on this Friday.
Is when including pyramid.debug should also look at the settings? Otherwise the method from_settings() on the DebugMailer seems unused and we cannot configure the directory with the
mail.top_level_directory
https://github.com/Pylons/pyramid_mailer/blob/5545c41830af5d56c77df2f0e4ba50bc669e2aae/pyramid_mailer/debug.py
I can provide a PR if you agree on the change.