Dovrei mandare delle mail con php nel modo più semplice (cioè con sendmail ma se necessario posso anche usare postfix).
Questo codice restiruisce la pagina naturalmente ma non arriva la mail.
Ho già visto che bisogna impostare il php.ini, ma quale? Io ne ho diversi. Inoltre non ho ancora capito se è necessario uncodice:$mail = mia@mail.it $message = "Per continuare la procedura di iscrizione clicca sul link sottostante: link Se hai ricevuto questa mail per sbaglio non fare niente, il tuo indirizzo mail verrà cancellato automaticamente. "; mail($mail, 'My Subject', $message);
servizio SMTP.
codice:m@marco ~ $ php -v PHP 5.3.5-pl0-gentoo (cli) (built: Feb 7 2011 18:42:10) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies m@marco ~ $ ls -la /etc/apache2 total 44 drwxr-xr-x 5 root root 4096 Aug 31 2010 . drwxr-xr-x 90 root root 4096 Mar 22 12:03 .. -rw-r--r-- 1 root root 6519 Nov 19 20:35 httpd.conf -rw-r--r-- 1 root root 12958 Aug 31 2010 magic drwxr-xr-x 2 root root 4096 Feb 7 19:11 modules.d drwxr-xr-x 2 root root 4096 Sep 20 2009 ssl drwxr-xr-x 2 root root 4096 Feb 15 17:18 vhosts.d m@marco ~ $ ls -la /etc/php total 32 drwxr-xr-x 8 root root 4096 Feb 3 23:17 . drwxr-xr-x 90 root root 4096 Mar 22 12:03 .. drwxr-xr-x 4 root root 4096 Nov 18 13:02 apache2-php5 drwxr-xr-x 4 root root 4096 Feb 7 19:11 apache2-php5.3 drwxr-xr-x 4 root root 4096 Feb 3 23:17 cgi-php5 drwxr-xr-x 4 root root 4096 Feb 7 19:11 cgi-php5.3 drwxr-xr-x 4 root root 4096 Feb 3 23:17 cli-php5 drwxr-xr-x 4 root root 4096 Feb 7 19:11 cli-php5.3 m@marco ~ $ php -i | grep mail mail.add_x_header => On => On mail.force_extra_parameters => no value => no value mail.log => no value => no value sendmail_from => no value => no value sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in Unknown on line 0 Path to sendmail => /usr/sbin/sendmail -t -i MAIL => /var/mail/m _SERVER["MAIL"] => /var/mail/m

Rispondi quotando