ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Communicate not working

December 01, 2010 10:11am

Subscribe [3]
  • #1 / Dec 01, 2010 10:11am

    Heiko

    135 posts

    I have setup a mailing list to which subscribing as well as unsubscribing is working fine.

    Now, I’m trying to send an e-mail using the communicate-tool and it simply does not work, no matter what protocol I choose, no matter if I’m trying send to the mailing list or directly to a single recipient.

    I have copied email_test.php from the utilities folder to my site root, to check if the server allows for sending mail via PHP, and it works flawlessly.

    Here’s the output from the debugger of all of the 3 available protocols:

    SMTP

    A PHP Error was encountered
    Severity: Warning
    
    Message: fsockopen() [function.fsockopen]: unable to connect to my_server (Connection refused)
    
    Filename: libraries/Email.php
    
    Line Number: 1654
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: fwrite(): supplied argument is not a valid stream resource
    
    Filename: libraries/Email.php
    
    Line Number: 1797
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: fgets(): supplied argument is not a valid stream resource
    
    Filename: libraries/Email.php
    
    Line Number: 1820
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: fwrite(): supplied argument is not a valid stream resource
    
    Filename: libraries/Email.php
    
    Line Number: 1797
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: fgets(): supplied argument is not a valid stream resource
    
    Filename: libraries/Email.php
    
    Line Number: 1820
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: fwrite(): supplied argument is not a valid stream resource
    
    Filename: libraries/Email.php
    
    Line Number: 1797
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: fgets(): supplied argument is not a valid stream resource
    
    Filename: libraries/Email.php
    
    Line Number: 1820
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: fwrite(): supplied argument is not a valid stream resource
    
    Filename: libraries/Email.php
    
    Line Number: 1797
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: fgets(): supplied argument is not a valid stream resource
    
    Filename: libraries/Email.php
    
    Line Number: 1820
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: fwrite(): supplied argument is not a valid stream resource
    
    Filename: libraries/Email.php
    
    Line Number: 1797
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: fwrite(): supplied argument is not a valid stream resource
    
    Filename: libraries/Email.php
    
    Line Number: 1797
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: fgets(): supplied argument is not a valid stream resource
    
    Filename: libraries/Email.php
    
    Line Number: 1820
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: reset() [function.reset]: Passed variable is not an array or object
    
    Filename: cp/tools_communicate.php
    
    Line Number: 703
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: array_slice() expects parameter 1 to be array, null given
    
    Filename: cp/tools_communicate.php
    
    Line Number: 704
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: Cannot modify header information - headers already sent by (output started at /is/htdocs/my_server/system/codeigniter/system/core/Exceptions.php:171)
    
    Filename: core/Common.php
    
    Line Number: 428

    PHP Mail

    A PHP Error was encountered
    Severity: Warning
    
    Message: reset() [function.reset]: Passed variable is not an array or object
    
    Filename: cp/tools_communicate.php
    
    Line Number: 703
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: array_slice() expects parameter 1 to be array, null given
    
    Filename: cp/tools_communicate.php
    
    Line Number: 704
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: Cannot modify header information - headers already sent by (output started at /is/htdocs/my_server/system/codeigniter/system/core/Exceptions.php:171)
    
    Filename: core/Common.php
    
    Line Number: 428

    Sendmail

    A PHP Error was encountered
    Severity: Warning
    
    Message: reset() [function.reset]: Passed variable is not an array or object
    
    Filename: cp/tools_communicate.php
    
    Line Number: 703
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: array_slice() expects parameter 1 to be array, null given
    
    Filename: cp/tools_communicate.php
    
    Line Number: 704
    
    A PHP Error was encountered
    Severity: Warning
    
    Message: Cannot modify header information - headers already sent by (output started at /is/htdocs/my_server/system/codeigniter/system/core/Exceptions.php:171)
    
    Filename: core/Common.php
    
    Line Number: 428
  • #2 / Dec 01, 2010 5:02pm

    Ingmar

    29245 posts

    What version and build of EE are you using? What can you tell us about the server and environment?

  • #3 / Dec 02, 2010 2:41am

    Heiko

    135 posts

    Well, thanks!

    I’m using EE v2.1.1 Build 20101020 without any 3rd party add ons, except HealthCheck. The server is running Apache/2.2, MySQL 5.1.49-1~bpo50+1-log and PHP v5.2.12.

    Is there anything else you might want to know?

  • #4 / Dec 02, 2010 5:15pm

    Ingmar

    29245 posts

    Is that a Windows server? Sendmail and PHP Mail are usually the same thing, really. Do you know what mail server is running locally? As to SMTP mail, the server simply refuses the connection. This, too, is a configuration issue that needs to be taken care of outside of EE.

  • #5 / Dec 03, 2010 3:25am

    Heiko

    135 posts

    OK, but why is the email_test.php working on the very same server? It seems to be a unix system, btw.

  • #6 / Dec 03, 2010 3:05pm

    Sue Crocker

    26054 posts

    See the error you listed earlier?

    Message: fsockopen() [function.fsockopen]: unable to connect to my_server (Connection refused)

    I found this thread: http://ellislab.com/forums/viewthread/169641/#809221

    Does any of this help?

  • #7 / Dec 08, 2010 4:36am

    Heiko

    135 posts

    Well, unfortunately this did not work. I changed both of the variables in system/codeigniter/system/libraries/Email.php to

    var $newline = "\r\n";
    var $crlf = "\r\n";

    Yet none of the email-options work.

  • #8 / Dec 08, 2010 5:47pm

    Ingmar

    29245 posts

    Have you asked your host for assistance? They should be able to tell us why the mail server is actively refusing a connection.

  • #9 / Jan 17, 2011 11:41am

    Heiko

    135 posts

    Alright, I’m still fighting this problem. One of the members of my hosting provider’s support team just mentioned, that insufficient user privileges might be the problem and advised me to change permissions for all the files related to sending e-mail via PHP-Mail.

    Ok then, which files are responsible for this? 😊

    Thank you!

  • #10 / Jan 17, 2011 5:39pm

    Ingmar

    29245 posts

    I don’t see how that could be a file permission error, honestly. That said, they should be able to tell us why the server is refusing the connection. There should be a log entry if nothing else.

  • #11 / Jan 18, 2011 12:40am

    Heiko

    135 posts

    Hmm, I don’t know… I’ve mirrored the EE install to my own hosted webserver, which is of the exact same kind, and it’s working flawlessly. This is also true for my local MAMP environment. I guess they’re just too lazy to even try to get it fixed.

    Thanks for your help though…

  • #12 / Jan 18, 2011 12:17pm

    Heiko

    135 posts

    Well, now I’m a little embarrassed…the solution to this problem is so damn easy that it hurts! :(

    While I was testing the sites’ functionality on my client’s server, I have always been using my own email, when instead I should have been using an address associated with the hosting providers mail-account. That’s why the site was working on my own server, but wasn’t on their’s. 😊

    Everythings fine now! Thanks for your patience.

    Ps: maybe you can add a hint to the user guide to avoid confusing future customers.

  • #13 / Jan 18, 2011 3:26pm

    Ingmar

    29245 posts

    Thank your for your feedback, and glad to see you’re up and running. Post again as needed, please.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases