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.

cron, php and email not sending

Discussion in 'E-mail Discussions' started by tgavin, May 17, 2006.

  1. tgavin

    tgavin Well-Known Member

    Joined:
    Jul 27, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    I have a php script that sends email using the php mail() function. This works when running without cron. However, once I get cron involved the script runs exactly as it should, except it doesn't send email. I've even tried using phpmailer with no luck.

    Is there something about using cron, that will prevent this?
     
  2. tgavin

    tgavin Well-Known Member

    Joined:
    Jul 27, 2004
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Got it figured out. It was actually a php session that wasn't passing the email address. It didn't work with cron because I couldn't use session_start(). d'oh!
     
Loading...

Share This Page