mail function problem!

Status
Not open for further replies.

m9127

New Member
Messages
5
Reaction score
0
Points
0
cant send an email using mail() function in php... whats the problem??
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
What sort of script are you running? The relevant code would help.

Are you getting error messages?

Are you testing the return value? Is it saying the mail is sent, but it is not arriving at the destination?

Did it work before on x10hosting and suddenly stop?
 

m9127

New Member
Messages
5
Reaction score
0
Points
0
<?php
$to = "somebody@example.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: webmaster@example.com" . "\r\n" .
mail($to,$subject,$txt,$headers);
?>

no i didn't get an error

yes its saying the mail is sent but it didn't arrive to the destination.

no, it hasn't worked on x10hosting...
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
1. 'From' should be an email account on your domain
2. Check that email account for bounced emails
3. Hotmail and some others bounce emails from x10hosting's servers due to the abuse by a few. They do not even end up in the spam folder.
4. On other providers, check the spam folder.
5. You are not checking the return value of mail(). How can you say it is saying the mail is sent?
 
Status
Not open for further replies.
Top