Problems with PHP, mail() and proxy.

Discussion in 'PHP' started by Zalaeth, Dec 7, 2009.

  1. #1
    Greetings all!

    I have two problems with PHP, the first one is about sending emails. I use WAMPServer 2. First, I have two php.ini files, one is in apache folder and the other is in php folder, I'm not sure if this is normal. To be certain I changed my SMTP settings in both files :

    SMTP = "smtp.cogeco.ca"
    smtp_port = 25

    ; For Win32 only.
    ; http://php.net/sendmail-from
    sendmail_from = "tanathar@gmail.com"

    I am on windows seven 64bit, I'm not sure if that is supposed to effect (in the comment it says "Win32" only, not sure why). Here is what I put in my php code :

    mail("civillagerp@hotmail.com","test subject","test body");

    And when I execute it, I get the error :

    Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.cogeco.ca" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\PHP\Includes\Administration.php on line 13

    No idea where this can come from, my ISP is cogeco (however I'm not sure with the port, I didn't find it).

    ================================

    Second problem, when I am at college and I'm on the proxy, my function that is supposed to validate an RSS feed by using another website loads infinitely, as if it didn't go through the proxy. All I've changed for the proxy is this in the php.ini file :

    ; Default proxy IP address (if required).
    pfpro.proxyaddress = "10.10.1.10"

    ; Default proxy port.
    pfpro.proxyport = 8080


    I'd be pleased if anyone could give me a hand..
     
    Zalaeth, Dec 7, 2009 IP
  2. javaongsan

    javaongsan Well-Known Member

    Messages:
    1,054
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #2
    mostly likely you are block by firewalls, you can try out with an internal smtp.
     
    javaongsan, Dec 7, 2009 IP
  3. Zalaeth

    Zalaeth Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    An internal SMTP....? I'll try disabling my windows firewall, if that's what you meant..

    Edit : Actually my firewall was already off on windows, and my router is set to allow everything.
     
    Zalaeth, Dec 7, 2009 IP
  4. javaongsan

    javaongsan Well-Known Member

    Messages:
    1,054
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #4
    I meant your college firewall
     
    javaongsan, Dec 7, 2009 IP
  5. Zalaeth

    Zalaeth Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Most of the time I am at home, specifically when I try sending emails. The problem with the proxy is only at college, then I'm not sure which firewall you're talking about. The one on the computer? On their networK?
     
    Zalaeth, Dec 8, 2009 IP
  6. gacba

    gacba Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Their network. The one you can't change. :)
     
    gacba, Dec 8, 2009 IP
  7. Zalaeth

    Zalaeth Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Alright, but I usually code at home, can't anyone help..?
     
    Zalaeth, Dec 8, 2009 IP
  8. javaongsan

    javaongsan Well-Known Member

    Messages:
    1,054
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #8
    you can set up your own smtp at home
     
    javaongsan, Dec 8, 2009 IP
  9. Zalaeth

    Zalaeth Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    And how can I do that?
     
    Zalaeth, Dec 8, 2009 IP
  10. Zalaeth

    Zalaeth Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Wow..awesome help guys..
     
    Zalaeth, Dec 9, 2009 IP