Problem with mail() function.

the mail() function

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 215
Joined: Wed Dec 07, 2011 5:25 pm

Mon Dec 19, 2011 4:41 pm

Hello nunkstop.
Possible causes:

Code: Select all

$to =;
$mess = "This is message";
$subject = "test mail";
$header = "From :";
$header = "From :";

Antispam system on your host + on gmail can detect it as Possible Email Spoofing
2) mail() function disabled for security reasons.(I saw a lot of hosting which disables it)
3) Wrong syntax $to =;
Right $to ='';
+ when sending your mails always use Return Path:
I create two mail address of my host, and using it to send mail to gmail ---> it's work well, and from gmail to it ---> it's also work well.
It is nothing to do with PHP on most cases it is Mailer Daemon and it send/accept mails directly not using PHP in this case.

Post Reply