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("[EMAIL PROTECTED]","subject","text");
if(mail("[EMAIL PROTECTED]","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.
[EMAIL PROTECTED]

# 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:[EMAIL PROTECTED]: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 = [EMAIL PROTECTED]

; 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 =



-- 
[EMAIL PROTECTED] mailing list

Reply via email to