MyBB Community Forums

Full Version: Separate file for email function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all. I found recently, in order to get my bulletin board to be able to send emails from my Windows based hosting service, that I needed to completely rewrite the function in the functions.php file that is used for sending emails.

Since the functions.php file is often one of the primary files changed in version upgrades, it requires me to hand-edit it each time instead of just replacing it with the patched version.

Is it possible to move the email function out of the functions.php into its own file since it may have to be modified for individual setups and only have a generic calling routine within the functions.php that points to the custom file?

It seems like it would be a worthwhile change but I'm basing that thought on a very limited php programming history. Is it possible to make this change without causing more harm than good?

Thanks,
Art
If you have to rewrite the function then its a good idea to tell MyBB what you are doing. This could be a bug with Windows servers so the MyBB team might want to look into it..
I think for 1.4 or 2.0 the mail function will be rewritten into a class, so if you decide to rewrite the mail function, you will be able to do it as you have wanted.
Thanks. That sounds like just the trick.

Art