Qdmailでメール送信

うまくいかないと以下のようなエラーが出る。

Qdmail error: Qdmail Version 1.2.6b ,PHP Version 5.3.3
Qdmail error: OS Linux ; PHP Version 5.3.3 ; Qdmail version 1.2.6b
php.ini status: mb_language = neutral ; mb_internal_encoding = UTF-8 ; mb_detect_order = ASCII,UTF-8
Qdmail Status debug: 0, log: 0, errorlog: 0
Qdmail error: Tyr Varidate Error by regex preg_match('/[^@]+@[^@]+/') the address is -> line -> 3699
Qdmail error: Illegal Mail AddressSystemValidete Address Method line -> 2770
Qdmail error: No recipient line -> 2849
Qdmail error: Error happen, see upper line -> 2194
Qdmail error: Send Error line -> 2115

対処方法

  • 25番ポートを開放した。
  • 以下のように設定し直した。

$this->Qdmail->reset();
$param = array(
  'host'=>'localhost',
  'port'=> 25,
  'from'=>'hchuno@mychuno.com',
  'protocol'=>'SMTP', ←SMTP_AUTHになっていた
  'user'=>'',
  'pass' => '',
);
$this->Qdmail->smtp(true);
$this->Qdmail->smtpServer($param);
$this->Qdmail->to("mychuno@mychuno.com");
$this->Qdmail->subject('件名です')
$this->Qdmail->from("hchuno@mychuno.com");
$this->Qdmail->text('本文です');
$this->Qdmail->send();