Can't send email

Hi!

My site can’t send email (via php function ‘mail’)
Site settings:
name: beaded-smile
php version: PHP 5.2
Sendmail: on

I know about 50 mail/day limit, but site do not send more than 5 mails per day.

Whats wrong?

@micis Go to Settings – Statistics and take screenshot and post here.

I have modified your code and tested, it showed sent, did you receive an email?

What file you modified?
My file located in “beaded-smile” - public_html" - “actions” - “send.php” and i can’t see any modifications.

I put some lines in this file for test ‘mail’ function:

$to2 = "m...v@gmail.com";
$subject2 = “Hello from 000webhost”;
$body2 = “testing php send function”;
$headers2 = “MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8”;
mail ($to2, $subject2, $body2, $headers2);

I got it from tutorial on this site.

I still can not send mail

Sorry, i can’t attach screenshot (proxy problem). on this page i see “sendmail quota” 0% used.

@micis If “Send Mail quota is 0%” then issue is with the php mail function.
try this, See if this helps you.

<?php
//if "email" variable is filled out, send email
  if (isset($_REQUEST['email']))  {
  //Email information
  $admin_email = "someone@example.com";
  $email = $_REQUEST['email'];
  $subject = $_REQUEST['subject'];
  $comment = $_REQUEST['comment'];
  //send email
  mail($admin_email, "$subject", $comment, "From:" . $email);
  //Email response
  echo "Thank you for contacting us!";
  }
  //if "email" variable is not filled out, display the form
  else  {
?>

Thanks for code, i try this:

//Email information
$admin_email = "m..ev@gmail.com";
$email = “info@ul…n.su”;
$subject = “my test subject”;
$comment = “check mail function”;
//send email
mail($admin_email, “$subject”, $comment, “From:” . $email);

no success.

@micis I just tried the mail function which i provided you and it worked fine.
https://testingsm.000webhostapp.com/ (Try this link.)


I see you’ve tried that link,

Yes, it worked on your site!

You changed my index.php with same code. I try it, but without success - mail didnt received!

@micis I see mistakes in your mail function script.
You’re using two mail functions for same form.
Plz Check with that.

You about file send.php? Yes, second “mail” for testing purposes.

After change php-version to 5.6 i have receive test mail!
But my site needed 5.2 or 5.3 version.