customize OutboundEmail.php and SugarPHPMailer.php

I want to overwrite the files mentioned in the title. Is it possible to add them in the custom folder and if so how?

I want to make it upgrade friendly.

Have you tried it?

It works for most files in SuiteCRM, though not all.

Try it, tell me what you tried, and if it doesn’t work I can look into making it customizable.

I am assuming you already know the basics:

Thank you, it works! (I guess. So far so good)

I thought there was something more to it since in my experience with modules and views you have to extend the class in the main module for it to be usable in the custom.

I guess that doesn’t apply to every file?

The generic case is simply that files in “custom” completely override their respective counterparts. This means the original file is completely ignored.

Actually the class extension mechanism is the exception to the rule, not the rule. In this case the files are loaded together with the base files, and the “composition” is made by the PHP language via the class extensions/redefinitions.