Re: [openupload-devel] No email notification
Status: Beta
Brought to you by:
tsdogs
|
From: <ee...@la...> - 2010-03-03 17:02:45
|
Alessandro Briosi a écrit : > > ee...@la... ha scritto: >> Alessandro Briosi a écrit : >>> Hi Edgar, >>> The e-mail function is in lib/general.inc.php >>> the function is sendmail() which then calls the php native mail() >>> function >> Hi Alessandro, >> >> Thank you, i'm going to ask my hosting support if they have an idea. >> >> In their FAQ they write about sendmail : >> >> ------------------------ >> >> 1- My php or perl forms providing access to sendmail or used for >> uploading files (the server sends "ok" to the browser, but nothing >> happens) don't work any more. What's the reason? >> Following recent waves of spam and an injection of urls on our servers, >> we have added a new rule on our servers blocking access for POST type >> requests with "http" in the QUERY_STRING. >> >> As a result you shouldn't make POST type requests with "http://" in the >> QUERY_STRING; you only need to enter www.domain.xyz for example instead >> of http://www.domain.xyz > > I don't think I do this, but should check to be sure. afair I always > use ./index.php in forms with post, but I might be mistaken. > >> >> 2- How can I send email from my site via the server, without >> authentication? >> As far as possible you need to use the PHP mail() function on the >> server, and not send emails via the SMTP servers. You shouldn't specify >> a sender email address (leave the relevant box blank) >> >> With mail(), it isn't possible to send email with your PHP or Perl >> scripts. You need to use sendmail (in this case the path being >> /usr/sbin/sendmail), or specify SMTP "localhost" as server, namely the >> server where your site is hosted and which has its own mail server. >> >> You therefore need to add to your config >> >> $smtp_server = "localhost"; >> >> 3- Where can I find sendmail? >> /usr/sbin/sendmail >> >> ------------------------ >> Does it help you ? >> > > This does clarify some things. > 1. as stated they suggest to use the php mail() function which is what > I do, but to leave the sender empty, so try changing line 270 in > lib/general.inc.php to this: > > return mail($to,$subject,$msg,$header); /* remove the from part */ Brilliant ! It was line 269 for me (return mail($to,$subject,$msg,$header); /* remove the from part */ instead of return mail($to,$subject,$msg,$header,'-f "'.$from.'"');), and now i can receive email notifications ! I'm going to ask my compagny to make a donation to your project, continue this great job ! Edgar |