Problem with mail() function.

the mail() function

Moderators: egami, macek, gesf

Post Reply
TheProdigyGuy
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 = youremail@host.com;
$mess = "This is message";
$subject = "test mail";
$header = "From : myemail@gmail.com";
==============================
$header = "From : myemail@gmail.com";

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 = youremail@host.com;
Right $to ='youremail@host.com';
+ when sending your mails always use Return Path:
http://php.net/manual/en/function.mail.php
+
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
  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 1 guest