We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Support for SMTP Logging Request on runtime (Java)

For the logging, we note the need to push this into the configuration file to generate a hard log of the connectivity that is taking place. This doesn’t really fit our needs, as we would like to have direct access to this programatically at run time.

A lot of times, we want to log to the event log the exceptions that are happening. So what would be good is in addition to the status code that you are exposing with the SMTP exception, it would be good to see the actual log that could be exposed via the exception.


I have tried understanding your requirements and have not been able to completely understand them. Can you please share the details in the form of sample example, source files and environment details so that we may proceed further to help you out.

Our requirement is that when the the smtpclient comes back with an exception (i.e. smtpException class), that you expose a property of the exception that is thrown that provides the text of the telnet conversation which lead to the throwing of the exception. Right now, you have a property for the stmpcode, but the actual telnet conversation in its entirety would be better for us.

This way, if we have access to the telnet conversation, we can log this in the database and handle via our normal exception routines. Having all this information stuffed into a log file on the client machine doesn’t do us any good and makes retrieving this from a “normal” user pretty much impossible.

Hopefully this makes sense now.

Summary: Add property to SmtpException class called “TelnetLog” that provides the entire conversation of the Smtpclient.


Thank you for sharing the additional details. I regret to share that at present there is no option to access the log information on run time. I have created an issue with ID EMAILJAVA-34508 in our issue tracking system to further investigate the requirements on our end. This thread has been linked with the issue so that you may be notified once the issue will be fixed.