myunit.service - Ping service
Loaded: loaded (/etc/systemd/system/myunit.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-11-29 00:33:57 CET; 32s ago
Process: 1685 ExecStart=/usr/bin/wget http://127.0.0.1:80/task_manager/index.php (code=exited, status=3)
Main PID: 1685 (code=exited, status=3)
Nov 29 00:33:57 openhabian systemd[1]: myunit.service: Service RestartSec=1s expired, scheduling restart.
Nov 29 00:33:57 openhabian systemd[1]: myunit.service: Scheduled restart job, restart counter is at 5.
Nov 29 00:33:57 openhabian systemd[1]: Stopped Ping service.
Nov 29 00:33:57 openhabian systemd[1]: myunit.service: Start request repeated too quickly.
Nov 29 00:33:57 openhabian systemd[1]: myunit.service: Failed with result 'exit-code'.
Nov 29 00:33:57 openhabian systemd[1]: Failed to start Ping service.
openhabian@openhabian:/etc/systemd/system $
Connection: opening to ssl://smtp.yandex.ru:465, timeout=300, options=array ( ) 2019-03-11 13:12:06 SMTP ERROR: Failed to connect to server: Network is unreachable (101) 2019-03-11 13:12:06 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
<?php
ini_set("display_errors",1);
error_reporting(E_ALL);
require_once('phpmailer/PHPMailerAutoload.php');
$mail = new PHPMailer;
$mail->CharSet = 'utf-8';
$name = 'ljfdfgg';//$_POST['name'];
$phone = '123445678';//$_POST['phone'];
$mail->SMTPDebug = 3; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.yandex.ru'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'логин от почты'; // Ваш логин от почты с которой будут отправляться письма
$mail->Password = 'пароль'; // Ваш пароль от почты с которой будут отправляться письма
$mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 465; // TCP port to connect to / этот порт может отличаться у других провайдеров
$mail->setFrom('wonder.pechkin@yandex.ru'); // от кого будет уходить письмо?
$mail->addAddress('куда отправлять'); // Кому будет уходить письмо
//$mail->addAddress('ellen@example.com'); // Name is optional
//$mail->addReplyTo('info@example.com', 'Information');
//$mail->addCC('cc@example.com');
//$mail->addBCC('bcc@example.com');
//$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
//$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'Новая заявка на сайте Pavira';
$mail->Body = 'Имя: ' .$name . '<br \> Телефон: ' .$phone;
$mail->AltBody = '';
if(!$mail->send()) {
echo 'Error';
} else {
echo 'Все супер';
}
//include('telegram/bot.php');
?>