Php mail();

Status
Not open for further replies.

wassgha

New Member
Messages
21
Reaction score
0
Points
0
Hi, is the php mail(); function working? Because i need it for my site...
 

dlukin

New Member
Messages
427
Reaction score
25
Points
0
Yes, it is working.

Code:
$headers = 'From: emailUser@myDomain.x10hosting.com' . "\r\n" .
    'Reply-To: emailUser@myDomain.x10hosting.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();



$sent = mail(  'myGmailAddress@gmail.com'  ,  
                   'Subject: PHP mail test'  , 
                   "A test of the PHP mail() function", 
                   $headers ) ; 

if( sent ){
    echo "<br />Sent .. $uid";
} else {
    echo "<br />Not sent ";
}

?>c

Where emailUser@myDomain.x10hosting.com is an account on my Domain.

Mail is sent and received.

Replacing emailUser@myDomain.x10hosting.com with a hotmail address also is sent, but ends up in my gmail spam folder.
 
Status
Not open for further replies.
Top