Php mail is not working on Starka

Status
Not open for further replies.

hero1711

Member
Prime Account
Messages
34
Reaction score
0
Points
6
Please fix this, it has been 1 week already, I really need this function.
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
Hello,

The php mail() function is enabled and works properly on starka, please check your syntax and parameters in your mail script.
 

hero1711

Member
Prime Account
Messages
34
Reaction score
0
Points
6
No it does not work, this is my test mail script Test Mail. It went to "Mail Sent." without any errors, but I didn't receive any email at all:

Code:
<?php
 $to = "test@hero1711.com";
 $subject = "Test mail";
 $message = "Hello! This is a simple email message.";
 $from = "test@hero1711.com";
 $headers = "From:" . $from;
 mail($to,$subject,$message,$headers);
 echo "Mail Sent.";
 ?>
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Send it to an account outside of x10hosting.

PHP:
<?php


//  TEST OF THE MAIL SYSTEM USING PHP mail()

date_default_timezone_set('America/Los_Angeles');
echo date('l jS \of F Y h:i:s A'); 
echo "\n";

$from = "test@hero1711.com";
$to="myGmailAccount@gmail.com"; 


$mailbody="Test message sent (PST): \n" . date('l jS \of F Y h:i:s A');
$subject="Test of PHP mail()" ;

$headers = "Content-type: text/plain; charset=windows-1251 \r\n";
$headers .= "From: $from\r\n";
$headers .= "Reply-To: $from\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();

$resp = mail($to, $subject, $mailbody, $headers);

if( $resp ){
    $outcome = "Mail sent" ;
} else {
    $outcome = "Mail not sent";
}

print "\nThe mail system said: $outcome\n\n" ;
exit();

?>
 

hero1711

Member
Prime Account
Messages
34
Reaction score
0
Points
6
Mails of hero1711.com are hosted on Google. But sending to another email address outside of hero1711.com works. Is that a misconfiguration of the php mail function? It worked well before the upgrade.
I need to send emails to addresses on hero1711.com.
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Well, at least the mail() function works.

How about trying to send it from test@hero1711.com to foo@hero1711.com (where foo is another account on gmail). Thinking that having the 'From' and 'To' addresses the same might cause the x10 anti-spam filters to eat the email.
 

GtoXic

x10 Support
Messages
636
Reaction score
17
Points
0
Hi there, could you please confirm that the settings in cPanel for where the MX server are correct, also, please check that your Google Apps mail is configured correctly.
 

hero1711

Member
Prime Account
Messages
34
Reaction score
0
Points
6
Hi there, could you please confirm that the settings in cPanel for where the MX server are correct, also, please check that your Google Apps mail is configured correctly.

Do you mean the MX Entry in cPanel? It shows:
Code:
Domain:  hero1711.com
Email Routing: Automatically Detect Configuration (recommended)
MX Records: 
  Priority: 0
  Destination: hero1711.com

I have not changed anything (cPanel & Google Apps), it just stopped working (partially, sending to another email address outside of hero1711.com works) after the upgrade.
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
Change Automatically Detect to "Remote Mail Exchanger" in the MX section of your cPanel.
 
Status
Not open for further replies.
Top