I'm a beginning php coder (really beginner) and I need to make a postcard-sending script but it wont send my emails.
<?php
$to_name = $_REQUEST['to_name'];
$to_email = $_REQUEST['to_email'];
$subject = 'teszt';
$msg = 'proba';
mail($to_mail, $subject, $msg, 'From:' . '[email protected]');
?>
<label for='to_name''>Címzett neve:</label>
<input type='text' name='to_name' id='to_name' class='gbi' size='30'>
<label for='to_email''>Címzett email cime:</label>
<input type='text' name='to_email' id='to_email' class='gbi' size='30'>
<label for='name''>Az ön neve:</label>
<input type='text' name='name' id='name' class='gbi' size='30'>
<label for='email''>Az ön email cime:</label>
<input type='text' name='email' id='email' class='gbi' size='30'>
<label for='text''>Üzenet:</label>
<textarea name='text' id='text' class='pct' ></textarea>
<br>
<input type='submit' >
Yes it is it a form :)
So the point is I made 4 images, every for images have a different submit button, so when they click on it a for pops up for the image.
I tried everything to send out the mails and no luck.
Any advice?
mail()command return true or false? You should check return values, they can be useful. Check your server's mail logs (mailqmay do the job), was an email accepted for delivery? Was the delivery attempted? Did delivery fail for any good reasons?