Jump to content

Automatization with processwire


pwired
 Share

Recommended Posts

Hi,

I was just wondering how to do this with processwire:

1. Send two times a day emails to specific email accounts to check that the email account

    is working correctly and inbox receives emails. It happened in the past that for some

    reason an email account stopped working for a few days. It is unacceptable that this

    happens without being notified about it. (Losing clients and orders as a consequence)

2. Check that all websites are online, and if not, send an email plus a sms message

     to a smartphone.

3. Simple event notification, such as when you have to pay a yearly domain name

     registration fee.

=================================================================

I know that there are complete packages for this that will do all this and more

but many times a simple and configurable solution is much more preferred.

Link to comment
Share on other sites

You could create a module based on LazyCron by Ryan and combine it with my E-Mail-Verfication-Module which checks also availability of mailhost.
 

Here is a function to check availability of an url.

function check($str, $needle) {
  return (strpos($str, $needle) !== false);
}

function validate($url) {
  $header = @get_headers($url);
  return (isset($header) && count($header) > 0 && check($header[0], "200"));
}
  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...