From owner-freebsd-questions@FreeBSD.ORG Thu Sep 13 23:42:10 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59BF216A417 for ; Thu, 13 Sep 2007 23:42:10 +0000 (UTC) (envelope-from carpetsmoker@rwxrwxrwx.net) Received: from mail.rwxrwxrwx.net (rwxrwxrwx.net [82.93.23.199]) by mx1.freebsd.org (Postfix) with ESMTP id 1008113C46A for ; Thu, 13 Sep 2007 23:42:09 +0000 (UTC) (envelope-from carpetsmoker@rwxrwxrwx.net) Received: by mail.rwxrwxrwx.net (Postfix, from userid 1001) id 622016D47F; Fri, 14 Sep 2007 01:46:19 +0200 (CEST) Date: Fri, 14 Sep 2007 01:46:19 +0200 From: Martin Tournoij To: freebsd-questions@freebsd.org Message-ID: <20070913234618.GA64826@glitch.rwxrwxrwx.net> Mail-Followup-To: freebsd-questions@freebsd.org, maanjee@gmail.com References: <2cd0a0da0709131341v4f6da28xae9040afb4b40dfb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2cd0a0da0709131341v4f6da28xae9040afb4b40dfb@mail.gmail.com> User-Agent: mutt-ng/devel-r804 (FreeBSD) Cc: maanjee@gmail.com Subject: Re: fatal: Recipient addresses must be specified on the command line or via the -t option X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2007 23:42:10 -0000 On Thu 13 Sep 2007 22:09, VeeJay wrote: > Hello there > > Could someone help me? I am really tired now spending 24 hours continously > makeing it work... > > I have installed Postfix on my 6.2 freebsd box. Now, whenever, I try to run > a php script to send mail out, this error is logged into /var/log/maillog > > *Sep 13 21:17:28 veejay postfix/sendmail[1396]: fatal: Recipient addresses > must be specified on the command line or via the -t option* > What is wrong there? Here is the php script. there is address: > > > $to = "info@badawa.com"; > $from = "info@example.net"; > $subject = "Hi!"; > $from_header = "From: $from"; > $contents = "this is email test\n\nDoes it work?"; > > if (mail($to, $subject, $contents, $from_header)) { > echo("

Message successfully sent!

"); > } else { > echo("

Message delivery failed...

"); > } > > -- > Thanks! > > BR / vj The script is fine, just tested it to be sure (lighttpd 1.4.18, php 5.2.3, postfix 2.4.5) Does postfix work at all? What hapens when you try to send mail with mail(1)? Can you attach you postfix and php configuration? Regards, Martin Tournoij