public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] ssmtp and php mail()
@ 2007-09-03 22:59 Stefano Guglia
  0 siblings, 0 replies; only message in thread
From: Stefano Guglia @ 2007-09-03 22:59 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-03 23:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-03 22:59 [gentoo-user] ssmtp and php mail() Stefano Guglia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox