send email
Posted: Fri Mar 15, 2013 11:10 am
Hello,
strange thing with my email code - I tried to send an email with form but sometime its successed and sometime it's not
if I change the TO filed it works (sometimes).
I thought that maybe GOOGLE block the server adress so I upload the same code to another server, but same thing happened...
here is the code:
I tried to send the email to number of emails address but it did worked...
What do I do wrong?
strange thing with my email code - I tried to send an email with form but sometime its successed and sometime it's not
if I change the TO filed it works (sometimes).
I thought that maybe GOOGLE block the server adress so I upload the same code to another server, but same thing happened...
here is the code:
Code: Select all
$message = "";
$subject = "email from website";
$date = mktime(date("H"), date("i"), date("s"), date("m") , date("d"), date("Y"));
$date = date("d.m.Y", $date);
$siteName = "my-website.com";
$from = "MIME-Version: 1.0 \r\n";
$from .= "From: $site_email \r\n";
$site_email = "some-email@gmail.com";
$message = "
$date
Site name $siteName
name: $name
phone: $phone
email: $email
text: $text
";
if (mail($site_email, $subject, $message, $from));
echo "<div class='msg msg_approve'>success</div>";I tried to send the email to number of emails address but it did worked...
What do I do wrong?