The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Php mail not working

Discussion in 'E-mail Discussions' started by AashX, Sep 17, 2006.

  1. AashX

    AashX Member

    Joined:
    Jan 30, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  2. rustelekom

    rustelekom Well-Known Member
    PartnerNOC

    Joined:
    Nov 13, 2003
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    moscow
    are you sure that php do nut send emails? have you check your exim logs for that?
     
  3. AashX

    AashX Member

    Joined:
    Jan 30, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  4. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    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!
     
  5. AashX

    AashX Member

    Joined:
    Jan 30, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    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.


    This code was running perfectly a week ago and suddenly noticed that it actually stoped sending out emails without any error showing.

    regards,
    AashX
     
Loading...

Share This Page