Hey, I contact you because the e-mail with php not send.
When I test on local with WAMP on Windows all is ok, but when I do the same thing with the same code on my website the e-mail not send.
Have you an idea ?
 Cannot Send Email with PHP
 Cannot Send Email with PHP
		Hey, I contact you because the e-mail with php not send.
When I test on local with WAMP on Windows all is ok, but when I do the same thing with the same code on my website the e-mail not send.
Have you an idea ?
 AlterVista Staff
					
					
						AlterVista Staff
					
					
                                        
					
					
						 
 
		On AlterVista you can only send emails by using the PHP email function. Which code are you using?
 
 
		Yes, I use this function, I don't know why but sometimes it works,
I have this code :
Thanks a lotPHP Code:$header = "MIME-Version: 1.0\r\n";
$header.= 'From: "enjoytips"<enjoytipscopyright@gmail.com>'."\n";
$header.= 'Content-Type:text/html; charset="utf-8"'."\n";
$header.= 'Content-Transfer-Encoding: 8bit';
include_once('modele/sujet_bbcode.php');
$contenu_good = get_contenu_sans_bbc(nl2br(htmlspecialchars($contenu)));
$message = '
<html>
<body>
Titre : '.$titre.'<br />
Auteur : '.$auteur.' ( '.$nom_prenom.')<br />
Contenu :<br /><br />
'.$contenu_good.'
</body>
</html>';
mail("enjoytipscopyright@gmail.com", $titre, $message, $header);

Last edited by karl94; 09-04-2016 at 07:22 PM. Reason: Formattazione
 AlterVista Staff
					
					
						AlterVista Staff
					
					
                                        
					
					
						 
 
		You shouldn't use that from header: it will likely trigger every spam filter. Use instead your alias (enjoytips at altervista dot org) in the from header.
 
 
		I change the adress like you says but it didn't change anything :/ I really don't know why it works with WAMP in local but not on altervista.
Sometimes I receive the mails :/
 AlterVista Staff
					
					
						AlterVista Staff
					
					
                                        
					
					
						 
 
		It's the mail provider that blocks the mails, from our end it's all sent correctly.
 
 
		Yes, but why it works always with WAMP on local and not online ? :/ Have you any idea ?
 AlterVista Staff
					
					
						AlterVista Staff
					
					
                                        
					
					
						 
 
		You should ask your mail provider, which is the one blocking the mail.
 
 
		Okey, thanks a lot