public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Stefano Guglia <sguglia@arrows.it>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] ssmtp and php mail()
Date: Tue, 04 Sep 2007 00:59:17 +0200	[thread overview]
Message-ID: <1188860357.5543.42.camel@pc-0001.localarea> (raw)

hello everybody!..

trying to use mail() + ssmtp in a php script but no way..

my host: pc-0001.localarea
mail server: pc-0004.localarea

I can send mail to remote smtp server thru ssmtp (and its alias
sendmail) via command line (and can also pop back to my client), but if
I try from php, the apache log says "sendmail: No recipients supplied -
mail will not be sent". Note that php condition is true.

any help??

thanks,
Stefano.



here my files:

<?
/* php script: */
mail("stefano@pc-0004.localarea","subject","text");
if(mail("stefano@pc-0004.localarea","soggetto","testo")) echo "mail
sent";
?>

#
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
#

# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=stefano@pc-0004.localarea

# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named
mail.domain.com
# The example will fit if you are in domain.com and your mailhub is so
named.
mailhub=pc-0004.localarea

# Example for SMTP port number 2525
# mailhub=mail.your.domain:2525
# Example for SMTP port number 25 (Standard/RFC)
# mailhub=mail.your.domain
# Example for SSL encrypted connection
# mailhub=mail.your.domain:465

# Where will the mail seem to come from?
rewriteDomain=

# The full hostname

# Gentoo bug #47562
# Commenting the following line will force ssmtp to figure
# out the hostname itself.

# hostname=_HOSTNAME_

# Set this to never rewrite the "From:" line (unless not given) and to
# use that address in the "from line" of the envelope.
#FromLineOverride=YES

# Use SSL/TLS to send secure messages to server.
#UseTLS=YES

# Use SSL/TLS certificate to authenticate against smtp host.
#UseTLSCert=YES

# Use this RSA certificate.
#TLSCert=/etc/ssl/certs/ssmtp.pem

*************************************************************

# /etc/ssmtp/revaliases
# sSMTP aliases
root:stefano@pc-0004.localarea:pc-0004.localarea

*************************************************************

#/etc/php/apache2-php5/php.ini
#/etc/php/cli-php5/php.ini
[mail function]
; For Win32 only.
;SMTP = localhost
;smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail
-t -i").
sendmail_path=/usr/sbin/sendmail

; Force the addition of the specified parameters to be passed as extra
parameters
; to the sendmail binary. These parameters will always replace the value
of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =



-- 
gentoo-user@gentoo.org mailing list



                 reply	other threads:[~2007-09-03 23:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1188860357.5543.42.camel@pc-0001.localarea \
    --to=sguglia@arrows.it \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox