Php mail not working

AashX

Member
Jan 30, 2006
10
0
151
Php is not sending out emails from my server.

/etc/eximmailtrap file doesnot exits
eximmailtrap=0 in /var/cpanel/cpanel.config

prevent nobody to send email is disabled in tweak setting.

Perl is sending out mail perfectly but PHP is not.

Can anyone suggest the solution?

regards,
AashX
 

rustelekom

Well-Known Member
PartnerNOC
Nov 13, 2003
290
0
166
moscow
are you sure that php do nut send emails? have you check your exim logs for that?
 

AashX

Member
Jan 30, 2006
10
0
151
Yes i'm sure

Hello,

I'm sure php is not sending email because i have been testing it.

BUT.. i just came to know that other php script is sending email but the main one is not sending.. This main script sends hunderds of emails every couple of minute. (Ecard site).

Is there any restriction my Cpanel for the script sending too many emails ??

Other php script sending less number of emails are working fine.. But the one sending huge number of emails is not working.

regards,
AashX
 

mctDarren

Well-Known Member
Jan 6, 2004
665
4
168
New Jersey
cPanel Access Level
Root Administrator
Hosts can set a restriction for outgoing mail to a certain number per hour. If you don't own the server or have root WHM access, contact your host.

If you do have root WHM access, go to "Tweak Settings" and under the "Mail" heading look for the line "The maximum each domain can send out per hour (0 is unlimited)". Set it to zero to allow unlimited mail.

Also, you can add a file as called "maxemails" in /var/cpanel, and set domain values within the file to only increase/decrease the allowed per hour limit by domains. For example, say you set 60 as your hourly limit (a little low but just for this example). The file below would allow domain1 to send 100 per hour and domain2 to send unlimited per hour. Domain3 would only be allowed to send 10 per hour.

/var/cpanel/maxemails
Code:
domain1.com=100
domain2.com=0
domain3.com=10
Hope that helps!
 

AashX

Member
Jan 30, 2006
10
0
151
Its unlimited

I have root access and my email per hour setting is 0 (unlimited)

As i told before, Emails are perfectly going out with perl scripts. Only problem is with PHP.

Here is the part of mail code that i use.


mail("$to", "$subject", $message,
"From: $fromaddr\r\n" .
"Reply-To: $replyaddr\r\n".
"X-Priority: 1 (Highest)\r\n");
This code was running perfectly a week ago and suddenly noticed that it actually stoped sending out emails without any error showing.

regards,
AashX