Customizing SMF > SMF Coding Discussion
Shutting off all forum emailing
globaprogramming:
My server host throws a big fat error every time the PHP mail() function is used. Is there any easy way to simply remove all emailing features from my forum?
If I have to go into the code, I will, I just need a solution, or somewhere to start.
Thanks in advance,
Globa Programming
Solution by vbgamer45:
Look in sources/subs-post.php
Find
--- Code: ---function sendmail($to, $subject, $message, $from = null, $message_id = null, $send_html = false, $priority = 3, $hotmail_fix = null, $is_private = false)
{
--- End code ---
Add after
--- Code: ---return;
--- End code ---
I have commented off the entire function and added
--- Code: ---return 0;
--- End code ---
Arantor:
Why not fix it instead?
Without seeing the error, I'm guessing your host doesn't support PHP mail() but instead requires SMTP - that's fine, SMF supports that too, it just needs you to get the details from your host and plug those into the mail configuration.
globaprogramming:
No, my server does not allow mailing at all, and I have no want to use it anyway. I just need a way to get rid of it.
vbgamer45:
Look in sources/subs-post.php
Find
--- Code: ---function sendmail($to, $subject, $message, $from = null, $message_id = null, $send_html = false, $priority = 3, $hotmail_fix = null, $is_private = false)
{
--- End code ---
Add after
--- Code: ---return;
--- End code ---
Arantor:
--- Quote from: globaprogramming on June 17, 2012, 11:34:44 AM ---No, my server does not allow mailing at all, and I have no want to use it anyway. I just need a way to get rid of it.
--- End quote ---
Then you have greater problems, since people will click notify and expect it to work and people who forget their password won't be able to change them without somehow contacting you.
And depending on the SMF version moderators won't know if there are any reported posts.
Navigation
[0] Message Index
[#] Next page
Go to full version