0

Hi!

I have some forms that is sendt to me by php mail() a few days ago these where working just fine, but suddenly yesturday i stoped recieving the emails. There ate two different types of these forms one that is connected to a mySQL server, and one that is not.

Here is the code of the one that is not sent to the mySQL server:

<?php 
//if($_GET["id"] == "web"){
if(isset($_GET["id"]) && $_GET["id"] == "web"){
 echo "";
} else { ?>
<div class='skjul_i_normal'>
	 <form action="" method="POST">
	 <input type='text' name='lanebelop' value='Hvor mye vil du låne?' onclick="javascript:value=''" ><br >
	 <input type='text' name='personnummer' value='Skriv inn personnummer' onclick="javascript:value=''" ><br >
	 <input type='text' name='epost' value='Skriv inn e-post adresse' onclick="javascript:value=''" ><br >
	 <input type='text' name='telefon' value='Skriv inn mobilnummer' onclick="javascript:value=''" ><br >
	 <span class='lille_check'>
	 <input type='checkbox' name='check' value='check' class='radio' >
	 Ved å sende inn lånesøknaden aksepterer du/dere at det blir foretatt en kredittvurdering av deg/dere. 
	 Det aksepteres også at gjenpartsbrev fra kredittvurderingsselskap kan bli sendt elektronisk pr sms.
	  Videre aksepteres det at all kommunikasjon med kredittgiver kan foregå elektronisk
		</span>

	 <input type='submit' name='submit' value="Send inn søknad" class='knap' >
	 </form>
	
	
	<?php 
	
		if(isset($_POST["submit"])){
		
		      if($_POST["lanebelop"] == "Hvor mye vil du låne?" || $_POST["personnummer"] == "Skriv inn personnummer" || $_POST["epost"] == "Skriv inn e-post adresse" || $_POST["check"] == ""){
					 echo "<br >
					 <span class='red'>Alle felter må fylles ut</span>";
					
					} else {
					
					
					
					echo "<br ><br ><br ><span class='red'>Takk for din søknad. Vi kontakter deg!</span>";

	 	 			
				  $to = "post@bbf.no";
					$subject = "BB Finans - Iphonesøknad";
					
					$message = "Lånebeløp: ".$_POST['lanebelop']."<br >";
					$message .= "Personnummer: ".$_POST['personnummer']."<br >";
					$message .= "Epost: ".$_POST['epost']."<br >";
					$message .= "Mobiltlf: ".$_POST['telefon']."<br >";										
					$headers = 'MIME-Version: 1.0' . "\r\n"; 
					$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
					
					$headers .= "Fra:".$_POST["epost"];
					$headers .= "\nReply-To:". $_POST["epost"];
					
					$sentOk = mail($to,$subject,$message,$headers);			
					
					

		}
		}
		?>	
		
		</div>
		
		<?php } ?>

Can someone tell me if there is something wrong with this code? It seems weird that it should be the code since it was working fine a few days ago, but i talked to my web host and they said nothig was wrong with the server.

Thanks in advance!

2
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by Stefano Mtangoo
0

Sorry, what i ment is that the form is working just fine, but the mail is not sendt to my inbox. I tried to use the exsact same code on another domain and then i got all of the e-mails. This would suggest something is wrong with my server maybe?

0

Sorry, what i ment is that the form is working just fine, but the mail is not sendt to my inbox. I tried to use the exsact same code on another domain and then i got all of the e-mails. This would suggest something is wrong with my server maybe?

can you send mails using same domain with other clients (Outlook Thunderbird et al)?
Try sending using any of those with your settings from phpmail you used above. If it don't work then contact your support/admin

0

It doesn't work, so i suppose it has something to do with my server or something, i'll contact them once again and hope they find the problem this time. Thanks!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.