I'm using simple code:
$mailer = new PHPMailer();
$mailer->IsMail();
$mailer->IsHTML(true);
$mailer->CharSet = 'utf-8';
$mailer->From = 'from@domain.com';
$mailer->Sender = $this->title;
$mailer->FromName = SITE_TITLE;
$mailer->Subject = $this->theme;
$mailer->Body = $this->text;
$mailer->AddAddress($this->mail);
$result = $mailer->Send();
Subject, Body, FromName, Sender are always the same. And it works with some email's, but it doesn't work with other emails with same domain names. For example, it works with email: some@mydomain.com, but it doesn't work with someAnother@mydomain.com PHPMailer always send me errorinfo: Could not instantiate mail function.
With cmd i can send email on any address with the next command:
echo "bla bla" | /usr/sbin/sendmail -f from@domain.com -v someAnother@mydomain.com -t -i
PHP INI: sendmail_path = /usr/sbin/sendmail -t -i
PHP VER: 5.5 PHPMailer Ver: 5.2.7
I'll be greatful with any assistance!
isSendmail()
instead ofisMail()
? In the sendmail command there should not be a space after-f
. – Synchro Nov 19 '14 at 14:05$this->title
? It should be an email address, and will be what is used with the-f
param because that's the envelope sender, not the from address. – Synchro Nov 19 '14 at 14:08