image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
LinkBack Thread Tools
  #1  
Old September 12th, 2008, 05:26 PM
Registered User
 
Join Date: Sep 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
k8__ is on a distinguished road
Problem with MSMTP and PHP

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:
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 someaddresshere@gmail.com
auth login
user someaddresshere@gmail.com
password *******
tls on
tls_certcheck off
and php.ini is:
Code:
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:
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:
echo "hello." | msmtp --debug --from=default -t someotheremailaddress@someotherdoma.in
Work correctly.

Thanks.

Last edited by Giaguara; October 25th, 2009 at 04:43 PM. Reason: removed email addresses
Reply With Quote
  #2  
Old September 12th, 2008, 11:12 PM
Registered User
 
Join Date: Sep 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
k8__ is on a distinguished road
Solved
Code:
putenv("TMPDIR=/tmp");
in the script php before the calling mail()
Reply With Quote
  #3  
Old October 25th, 2009, 02:52 PM
Registered User
 
Join Date: Sep 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
k8__ is on a distinguished road
Please delete the mail [hidden form of the email address to the script above] and [the other address in a cryptic form used in the other example above] ON The Topic Up! Thanks.

Last edited by Giaguara; October 25th, 2009 at 05:51 PM. Reason: removed email
Reply With Quote
  #4  
Old October 25th, 2009, 04:42 PM
Giaguara's Avatar
Chmod 760
 
Join Date: Nov 2002
Location: ~
Posts: 8,619
Thanks: 7
Thanked 99 Times in 98 Posts
Giaguara is a jewel in the roughGiaguara is a jewel in the roughGiaguara is a jewel in the rough
k8__, I think you should be able to change your posts yourself.. but anyway, doing that for you now.
__________________
MacBook Pro | Dell Mini Inspiron 9 | Mac Mini | Newton 2000 | iPhone | @Work : Dell D620 & 2x20" + a lot of Macs | Workstation, VC & Fusion
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do.
~ Samuel Clemens | Rants | Photos
Reply With Quote
  #5  
Old October 25th, 2009, 04:45 PM
Registered User
 
Join Date: Sep 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
k8__ is on a distinguished road
Many thanks Giaguara. Please delete this post and my latest post.


I don't have the permission to delete it.


Thanks!
Reply With Quote
  #6  
Old October 25th, 2009, 05:52 PM
Giaguara's Avatar
Chmod 760
 
Join Date: Nov 2002
Location: ~
Posts: 8,619
Thanks: 7
Thanked 99 Times in 98 Posts
Giaguara is a jewel in the roughGiaguara is a jewel in the roughGiaguara is a jewel in the rough
Fatto
__________________
MacBook Pro | Dell Mini Inspiron 9 | Mac Mini | Newton 2000 | iPhone | @Work : Dell D620 & 2x20" + a lot of Macs | Workstation, VC & Fusion
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do.
~ Samuel Clemens | Rants | Photos
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 12:29 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.