#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0

    Windows 7 Home Premium and PHP Mail Issues


    Hello,
    Im currently developing a website in PHP and wish to send out mail using PHPs mail function and my ISP's SMTP mail server however when i send out an email to my account I do not receive it.. after hours of disabling firewalls, playing around with previous versions of PHP testing my ISP's mail server the problem lies with Windows 7 Home Premium.

    I setup the exact same system on Windows 7 Ultimate and sent out an email using PHP's mail function and woopydoo! I recieve the email... so why does Home Premium not send out emails but Ultimate does?

    - Shaun
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,349
    Rep Power
    594
    No way to know without looking at your logs. Especially the dialogue with your ISP's SMTP server.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0
    Originally Posted by gw1500se
    No way to know without looking at your logs. Especially the dialogue with your ISP's SMTP server.
    Ive tried, mail() reports it was a success.. my ISPs mail server works fine as said in the post, tried the exact same thing but on an Ultimate version of windows 7 and it works instantly without a problem.

    Its almost asif Windows 7 Home Premium is missing something that Windows 7 Ultimate has.

    Both setups are exactly identically accept 1 machine is windows 7 ultimate and the other is windows 7 home premium.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,349
    Rep Power
    594
    Like I said, you give us nothing to go on. Obviously there is a difference somewhere and the logs is where you start.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0
    Originally Posted by gw1500se
    Like I said, you give us nothing to go on. Obviously there is a difference somewhere and the logs is where you start.
    Ok, Were do you suggest i look for these logs, Theres nothing in the PHP logs?

    Thanks
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,349
    Rep Power
    594
    Are you using Apache for your httpd on both? Are they the same version on both? Did you run phpinfo on both to verify they are identical? Is the SMTP service configured the same on both? The SMTP service log is available just like any other windows (event viewer) log. In System Log Properties, in the Event source list, select SMTPSVC.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  12. #7
  13. For POny!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    Amsterdam
    Posts
    416
    Rep Power
    115
    Using home premium here and it works. This is what i use in php.ini

    Code:
    [mail function]
    ; For Win32 only.
    ; http://php.net/smtp
    SMTP = smtp.YOURISP.COM
    ; http://php.net/smtp-port
    smtp_port = 25
    
    ; For Win32 only.
    ; http://php.net/sendmail-from
    sendmail_from = yourmail@example.org
    
    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    ; http://php.net/sendmail-path
    ;sendmail_path =
    
    ; Force the addition of the specified parameters to be passed as extra parameters
    ; to the sendmail binary. These parameters will always replace the value of
    ; the 5th parameter to mail(), even in safe mode.
    ;mail.force_extra_parameters =
    
    ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
    mail.add_x_header = On
    
    ; Log all mail() calls including the full path of the script, line #, to address and headers
    ;mail.log =
  14. #8
  15. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    There are no default or OS-level differences between any versions of Windows 7 that would make mail work on one but not on another. There must be some configuration difference between the two machines that causes the problem.

    If mail() is returning true, your server logs are probably not going to show what the problem was. If PHP was aware of the problem, mail() probably would have returned false. The mail server logs probably would show the problem, but I'm guessing you don't have access to those.

    Are both of your machines on the same network?
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo