Problema PHP - sendmail
Last Updated: May 22 2015 18:47, Started by
MikeRGDD
, May 22 2015 16:26
·
0
#1
Posted 22 May 2015 - 16:26
Salut. Am facut un script care trimite un e-mail catre un utilizator care isi face cont pe site-ul meu.
Problema este ca scriptul imi trimite si mie o copie dupa acel e-mail, pe adresa "from". Momentan nu este deranjant, pentru ca nu am lansat acel website, dar dupa lansare voi avea un trafic gigant. Ma tem ca, casuta mea de e-mail va fi spamata cu mesaje tip welcome si reset password care sunt trimise catre utilizatori. Postez aici scriptul: <?php $to = $_POST['username']; $subject = 'Bun venit pe SITE-ul meu'; $message = 'Mesajul in format HTML'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'To: ' . $_POST["username"]; $headers .= '\r\nFrom: Site-ul meu <[email protected]>'; mail($to, $subject, $message, $headers); ?> Configuratia PHP sendmail: [mail function] SMTP = localhost smtp_port = 25 ;sendmail_from = [email protected] sendmail_path = "sendmail -t [email protected]" ;mail.force_extra_parameters = "" mail.add_x_header = On ;mail.log = ;mail.log = syslog Nu-mi dau seama de ce se intampla asta...aveti voi vreo idee ? Detalii tehnice: root@nginx:~# nginx -v nginx version: nginx/0.7.67 root@nginx:~# php -v PHP 5.6.7-1 (cli) (built: Mar 24 2015 12:30:15) Copyright © 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright © 1998-2015 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright © 1999-2015, by Zend Technologies Orice ajutor este binevenit. Multumesc |
#2
Posted 22 May 2015 - 18:06
sendmail man
-t Read message for recipients. To:, Cc:, and Bcc: lines will be scanned for recipient addresses. The Bcc: line will be deleted before transmission. |
#3
Posted 22 May 2015 - 18:47
Fara -t nu trimite mail-ul. Nu ajunge nici in casuta mea, nici in casuta utilizatorului.
Fara [email protected] se trimite, ajunge in ambele casute, insa expeditorul nu e afisat corect. Imi apare ca a fost trimis de pe www-data Edited by MikeRGDD, 22 May 2015 - 18:48. |
Anunturi
Bun venit pe Forumul Softpedia!
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users