vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   disabling email sending (https://vborg.vbsupport.ru/showthread.php?t=91262)

jsharper 06-28-2005 06:31 PM

disabling email sending
 
I'd like to disable the ability for my dev/test board instance to send out any email to avoid the possibility of an end user ever getting an email from the dev board (which causes nothing but confusion). I know I can delete the scheduled tasks that send most of it, but then I have to do that every time I copy the database from production to dev (which I've been doing a lot lately to keep dev current) and it still doesn't prevent emails from going out if someone posts to a thread that someone is subscribed to.

Is there somewhere quick and easy I can comment something out or otherwise modify some code to disable all email sending abilities? Note that I use the same instance of apache/php for the prod board, so I can't just deliberately break or misconfigure php's mail sending abilities or it will also break the prod board.

This is with vB 3.0.7

Thanks

tamarian 06-28-2005 06:39 PM

In includes/mail.php

Find:
PHP Code:

        if ($minusf)
        {
            
$this->success = @mail($toemail$subject$messagetrim($headers), "-f $fromemail");
        }
        else
        {
            
$this->success = @mail($toemail$subject$messagetrim($headers));
        } 

Replace with this:
PHP Code:

$this->success 1

And if you use SMTP, replace the entire content of function send in the same file with:

PHP Code:

            return true


jsharper 06-28-2005 06:48 PM

Thanks! I was grepping for something obvious like this but I apparently missed the includes directory.

While I was in there, I noticed a lot of (disabled) SMTP-sending code. Does anyone know if this code, in 3.0.7, is functional enough to use? Or is it untested with known problems? It looks like it would be pretty easy to enable it, but I don't want to do it if others have tried and found it to be buggy.

tamarian 06-28-2005 07:07 PM

Quote:

Originally Posted by jsharper
Thanks! I was grepping for something obvious like this but I apparently missed the includes directory.

While I was in there, I noticed a lot of (disabled) SMTP-sending code. Does anyone know if this code, in 3.0.7, is functional enough to use? Or is it untested with known problems? It looks like it would be pretty easy to enable it, but I don't want to do it if others have tried and found it to be buggy.

You can compare it with the 3.5 code, as it's enabled there. I've tested it in 3.5 and it works fine.

Marco van Herwaarden 06-28-2005 08:23 PM

It is not really supported, but you can make it work by manually editing the files.


All times are GMT. The time now is 07:11 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01081 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete