1
To schedule email submissions, do you need to do something other than put the file inside the /etc/cron.Aily folder (for daily submissions)? This code works when I run directly on the server, you need to edit some other file to make the scheduled upload?
<?php
require 'http://insidetv.net.br/PHPMailer/class.phpmailer.php';
$email = new PHPMailer();
$email -> IsSMTP();
$email -> Mailer = 'smtp';
$email -> SMTPAuth = true;
$email -> Host = 'smtp.gmail.com';
$email -> Port = 465;
$email -> SMTPSecure = 'ssl';
$email -> CharSet = 'UTF-8';
$email -> Username = "[email protected]";
$email -> Password = "********";
$email -> IsHTML(true);
$email -> SingleTo = true;
$email -> From = "[email protected]";
$email -> FromName = "InsideTv";
$email -> addAddress("[email protected]");
$email -> Subject = "teste";
$email -> Body = "teste";
$email -> send();
?>
I’m sure this is it?
require 'http://insidetv.net.br/PHPMailer/class.phpmailer.php';
– Maurivan
Yes, the way is right.
– Diego Vieira
I don’t know how your files are, but try
require 'PHPMailer/class.phpmailer.php';
.– Maurivan
Still not sending.
– Diego Vieira
You can post the command you used to schedule this task?
– Maurivan
From what I read, to schedule time, day, week, month, just put the file into the respective folder. Only one command needs to be executed for specific times.
– Diego Vieira