email print_debugger dumps attachment data #1742

Closed
laurencei opened this Issue Aug 27, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@laurencei

Hi,

Do you think its possible to add some functionality to the email "print_debugger" so attachment data is not dumped?

perhaps: function print_debugger ($dump_attachment = true)

so that way its backwards compatible, but you can set print_debugger(false) to not include the attachment in the debug?

This is useful for people like me who use database email queues, and I can dump any errors into the record, without having to also dump the file itself!

@laurencei

This comment has been minimized.

Show comment Hide comment
@laurencei

laurencei Aug 29, 2012

Here is a StackOverflow discussion about the issue - and a possible solution: http://stackoverflow.com/questions/12145345/capture-email-smtp-error-with-print-debugger-without-attachment-dump

Basically we could make "print_debugger(true)" mean that ONLY the error message is dumped, and none of the email data. This might be useful to return to a user or store in a database.

To do this, just return $this->_debug_msg[0] and nothing else from print_debugger()

Here is a StackOverflow discussion about the issue - and a possible solution: http://stackoverflow.com/questions/12145345/capture-email-smtp-error-with-print-debugger-without-attachment-dump

Basically we could make "print_debugger(true)" mean that ONLY the error message is dumped, and none of the email data. This might be useful to return to a user or store in a database.

To do this, just return $this->_debug_msg[0] and nothing else from print_debugger()

@laurencei

This comment has been minimized.

Show comment Hide comment
@laurencei

laurencei Aug 29, 2012

...and keep it backwards compatible by leaving function print_debugger ($dump_attachment = true) - so that no one has to change their application code or debugging code (unless they want this functionality)

...and keep it backwards compatible by leaving function print_debugger ($dump_attachment = true) - so that no one has to change their application code or debugging code (unless they want this functionality)

narfbg added a commit that referenced this issue Nov 26, 2012

CI_Email::print_debugger() option to limit the type of data to be pri…
…nted

(an alternative to PR #1759; partially solves issue #1742)
@narfbg

This comment has been minimized.

Show comment Hide comment
@narfbg

narfbg Nov 26, 2012

Contributor

See the above commit.

I initially thought that this was about excluding only the attachment data from the output, but now seeing that it's not the case.

Contributor

narfbg commented Nov 26, 2012

See the above commit.

I initially thought that this was about excluding only the attachment data from the output, but now seeing that it's not the case.

@narfbg narfbg closed this Nov 26, 2012

nonchip pushed a commit to nonchip/CodeIgniter that referenced this issue Jun 29, 2013

CI_Email::print_debugger() option to limit the type of data to be pri…
…nted

(an alternative to PR #1759; partially solves issue #1742)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment