SMS and Email Notifications

Discussions about RaZberry - Z-Wave board for Raspberry computer
kali
Posts: 9
Joined: 28 May 2015 22:52

Email Notifications - it's simple

Post by kali »

hi,
To send email i just use sendmail and apache2 server:

1. apt-get install sendmail apache2 php5. No special confiugre is necessary

2. Create php script, saved in root directory of apache: /var/www/html/al.php.

<html>
<?php
$to = 'youremail@yourdomain.com';
$subject = 'ALARM - FIRE!!!';
$message = 'Your message ';
echo $to;
$headers = 'From: iHome' . "\r\n" .
'Reply-To: youremail@yourdomain.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);

echo '<br> it's works!';
?>
</html>


To check, you can open in webbrowser: http://yourip/al.php

3. In z-waye create app HTTP Device 1 and configure as below:

URL for action On
http://yuourip/al.php
HTTP method to use: GET



4. And as last You should create Logical Rule where some action run your scen (HTTP Device1)

It's all to send email. It's word perfektly and quick


I propouse you try pushbullet app! It's greate!
Post Reply