Well, I've got a problem: I'm using a form to send emails to a mailbox using mail(), but they're not arriving.
I'm sure that the mailbox exists, and that the function mail() returns true, that is, the e-mail was supposedly sent. Also, if I use my gmail account as addressee, the message arrives normally.
Do you have any idea of why it's not arriving?
Though I think it's irrelevant, here's the code, take a look:
PHP Code:
<?php if(mail($para,"Talk to Us - $nome",$msg,$headers)){ @mail($email,"Talk to Us - $nome_cliente",$msg2,$headers2); ?> <script> alert('<?php echo $nome ;?>, your message was sent.'); location.href='http://www.bioseiva.com.br'; </script> <?php }else{ ?> <script> alert('<?php echo $nome ;?>, sorry, your message could not be sent.'); location.href='http://www.bioseiva.com.br'; </script> <?php } ?>
I seem to be having a similar problem so if somebody could help us both that would be great.
I have form information written to a DB and e-mailed to me. Both always worked in the past but about a month ago I stopped getting the e-mails. It still puts the information into the DB. I didn't change any code so I'm not sure what's wrong. Here it is anyway:
Code:
<?
include("connect.php");
$name=$_POST['vName'];
$email=$_POST['vEmail'];
$site=$_POST['vSite'];
$inq=$_POST['vInq'];
$comments=$_POST['vComment'];
mysql_query("INSERT INTO contacts
(name, email, site, inq, comments) VALUES('$name', '$email', '$site', '$inq', '$comments') ")
or die(mysql_error());
$msg = "A new entry has been added to your form";
$msg .= "\n-----------------------------------\n";
$msg .= "Name: $name\n";
$msg .= "Email: $email\n";
$msg .= "Website: $site\n";
$msg .= "Reason: $inq\n";
$msg .= "Comment: $comments\n";
mail ("myemail@gmail.com", "New Entry", $msg);
?>
You can also check to see if the sending email server has been blacklisted. Some freemail accounts (hotmail, yahoo, etc) automatically block incoming emails originating from dynamic IP blocks or those identified as spammers in spam block lists.
Bookmarks