Mam problem z wysyłaniem maila. Maile dochodzą na gmail, nie dochodza na wp.pl. W czym może tkwić problem ? To wina serwera z którego został wystałny (proserwer.pl) czy może tego skryptu ?
{
$phpmailer = new PHPMailer(true);
$phpmailer->AddReplyTo($this->conf->get('email'), 'Administrator');
$phpmailer->Subject = $_POST['title'];
$phpmailer->MsgHTML($_POST['message']);
$phpmailer->SetFrom($this->conf->get('email'), 'Administrator');
$users = $this->getUsers($_POST['newsletter_group']);
foreach ($users as $user) //odbiorcy
{
$phpmailer->AddAddress($user['email'], $user['name'] . ' ' . $user['surname']);
}
$files = $this->getFiles();
foreach ($files as $file)
{
$phpmailer->AddAttachment('tmp/' . $file); // dodaje załączniki
}
$phpmailer->Send();
}
catch (phpmailerException $e)
{
echo $e->errorMessage(); //Pretty error messages from PHPMailer }
catch (exception $e)
{
echo $e->getMessage(); //Boring error messages from anything else! }