I would like to attach a file with the log sent by the log4net smtp appender.
This would allow us to include screenshots or input file data with the email log.
Is there anyway to do this automatically out of the box. I can’t seem to find any information on this, and am guessing we would need to either do this separate to the log4net logging or write the information inside the log (but that would need us to deserialise it after receiving the email).
This is not supported. It would also be quite hard to support because only a few logging targets can support attaching files.
But you could – as a kind of work around – generate HTML log messages and use data URIs to embed binary data and especially images.