vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Temporarily disable email (https://vborg.vbsupport.ru/showthread.php?t=277732)

yellow_spider 01-29-2012 04:55 PM

Temporarily disable email
 
Is there a way to temporarily disable all outgoing mail ?

I am aware of the log to file but will it still attempt to send mail with that set up ? :confused: , I do need that as I want to check the mails being sent correctly etc, without actually sending it.

XF and IPB both have a config variable you can set to prevent outbound mail going (just logs to a file instead) for testing / debug purposes. Does VB4 have anything similar ? , I guess I just need to add a line somewhere or enable something in a configuration file.

kh99 01-29-2012 07:04 PM

You can define DISABLE_MAIL in config.php to have it logged to a file. Here's the comment from class_mail.php:

Code:

/**
 * Send the mail.
 * Note: If you define DISABLE_MAIL in config.php as:
 *        delimited email addresses        - Only mail for the recipients will be sent
 *        <filename>.log                                - Mail will be logged to the given file if writable
 *  any other value                                - Mail will be disabled

If you run a mail test from the admincp, I believe (based on a look at the code) that it will be sent even if you've defined DISABLE_EMAIL.

yellow_spider 01-30-2012 01:12 PM

Thank you. :) Just to clarify this is what you meant (in config.php) ?

Code:

$config['disable_mail'] = 1;
My testboard is at 3.8 so I guess its the same for 3.x and 4.x

kh99 01-30-2012 01:14 PM

I think what it actually means is:

Code:

define('DISABLE_MAIL', 1);

Sorry, I should have included that in my post.

yellow_spider 01-30-2012 01:28 PM

Thank you :)


All times are GMT. The time now is 04:04 PM.

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.01362 seconds
  • Memory Usage 1,712KB
  • 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_code_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