vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Daily vBulletin diagnostic email (https://vborg.vbsupport.ru/showthread.php?t=310778)

chefy 04-25-2014 04:12 AM

Daily vBulletin diagnostic email
 
Hi,

From time to time I go to:

ACP - Maintenance - Diagnostics - Email

And send myself an email so I can see if the SMTP server I'm using to send vBulletin emails is working. I would like to have this job being performed automatically on a daily basis. I guess I have to setup a cron job in the ACP but I don't know what to put in "Filename"... I guess I have to code a small vBulletin powered script that will send the email and place it at /includes/cron/ however I'm not a programmer so I don't know what code should I put on that file.

Could you please help me?

Thanks.

kh99 05-06-2014 10:49 PM

Sorry for the late reply, but if you're still looking for this, you could copy one of the existing files in includes/cron and change it to send your mail (the file name you enter when creating a scheduled task is the name of a php file in includes/cron).

Another way to do it would be to piggy back on the daily cleanup task by writing a plugin for your mail code and using hook cron_script_cleanup_daily.

As for the code, the code that sends the diagnostic email is in admincp/diagnostic.php, in the section that starts with the "Start mail test" comment. That code's written to display any errors that happen when trying to send an email, so it might be more complicated than you need. Or you could copy it and send any errors to yourself in a PM or something like that.

Anyway, I'm sorry I don't have time right now to work out the exact code.


All times are GMT. The time now is 05:43 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.01099 seconds
  • Memory Usage 1,705KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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