Problem with MAIL() and MSMTP()

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Problem with MAIL() and MSMTP()

Postby K8 » 16. September 2008 22:11

Hi guys,
i using xampp and i trying to configure MSMTP with PHP to send the mail with function mail() of php.
I have a this problem, with this config:
Code: Select all
sh-3.2# ls -ls /var/empty/
total 8
8 -rw-------  1 nobody  nobody  195 12 Set 22:35 .msmtprc
0 -rwxrwxrwx  1 nobody  nobody    0 12 Set 22:35 log.log
sh-3.2# cat /var/empty/.msmtprc
account default
logfile /var/empty/log.log
syslog off
host smtp.gmail.com
timeout 60
port 587
from dsbb@gmail.com
auth login
user fasfsc@gmail.com
password *******
tls on
tls_certcheck off

and php.ini is:

Code: Select all
sendmail_path = "/opt/local/bin/msmtp -C /var/empty/.msmtprc -t"


Ok,
when i try to send mail with mail() i receive this error in error_log of apache:

Code: Select all
msmtp: cannot create temporary file: Permission denied


I do not know where I must modify the permissions and I must wants to write files temporary.

Some ideas?

p.s If i try to send mail with this command to shell bash:
Code:
Code: Select all
echo "hello." | msmtp --debug --from=default -t di*********@libero.it

Work correctly.

Thanks.
Last edited by K8 on 01. August 2010 02:23, edited 2 times in total.
K8
 
Posts: 3
Joined: 16. September 2008 22:06

Postby K8 » 16. September 2008 22:14

If i use
Code: Select all
putenv("TMPDIR=/tmp");

before the calling mail()
the mail sent correctly but function mail() return false.

:( Why ? :(
Solution?

p.s How set environment variable on xampp like this solution on pure apache:
http://lists.apple.com/archives/web-dev ... 00057.html


Thankssss.
K8
 
Posts: 3
Joined: 16. September 2008 22:06


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 7 guests