CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Mailing not starting... but SMTP seems to be working
Pages: [1]

Author Topic: Mailing not starting... but SMTP seems to be working  (Read 5699 times)

Whygee

  • Guest
Mailing not starting... but SMTP seems to be working
March 03, 2009, 05:14:19 pm
I've just updated CiviCRM and I can't use CiviMail anymore: The mailing is starting with the cron job, but I get 100% bounce rate.

However, it works when I send an email to a single contact in CiviCRM so I think SMTP is properly configured.

I was wondering if someone could point em in the right direction.

Thanks.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Mailing not starting... but SMTP seems to be working
March 04, 2009, 02:13:58 am
Which version did you update from and to?

You need to investigate your email server logs – it’s a bit hard to guess what’s wrong.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Whygee

  • Guest
Re: Mailing not starting... but SMTP seems to be working
March 04, 2009, 09:12:46 am
I upgraded from 1.9 to 2.0, then to 2.1.

When can I find those logs?

Thanks.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Mailing not starting... but SMTP seems to be working
March 05, 2009, 02:16:26 am
Quote from: Whygee on March 04, 2009, 09:12:46 am
I upgraded from 1.9 to 2.0, then to 2.1.

Ah, that’s good to know. We haven’t encountered any reports on bounces generated by CiviCRM 2.1. (Please also consider updating your forum profile with the versions you use – once you’re settled down after the upgrade, of course.)

Quote
When can I find those logs?

It depends what you use for sending. I assume you’re not using CiviSMTP, so you need to look at your system’s mailserver’s logs; if this is a shared hosting, you might need to ask the administrator(s).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Whygee

  • Guest
Re: Mailing not starting... but SMTP seems to be working
March 05, 2009, 09:40:44 am

I tried to send the mailing with my old install (on 1.9) and it didn't work either so maybe I've changed a configuration I shouldn't have.

I'm on Bluehost shared hosting so I cannot access the logs. I've contacted support and they told they could provide me with the logs if I contact them immediately after the error occurs. See this http://www.bluehostforum.com/showthread.php?t=14 for a similar problem.

I'll try to get back with that.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Mailing not starting... but SMTP seems to be working
March 06, 2009, 03:12:45 am
Quote from: Whygee on March 05, 2009, 09:40:44 am
I'm on Bluehost shared hosting so I cannot access the logs.

You might also want to search this forum with the Bluehost keyword to see whether other CiviCRM users did not face this (or other relevant) issue.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Whygee

  • Guest
Re: Mailing not starting... but SMTP seems to be working
April 02, 2009, 05:42:13 pm
Sorry to get back on this topic, but I thought the upgrade to 2.2 had fixed this problem. However, I've tried to do a new mailing and I didn't receive the test message.

When I go to the SMTP settings page, I do receive the test message. The problem is with the test message within the mailing.

Can someone tell me what can cause that?

Thanks.

Edit: Here's the error message I get when I run the cron job
Code: [Select]
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] =>
    [message] => Invalid response code received from SMTP (outbound mail) server while attempting to send email.  This is often caused by a misconfiguration in the CiviCRM Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP).
    [mode] => 16
    [debug_info] =>
    [type] => PEAR_Error
    [user_info] =>
    [to_string] => [pear_error: message="Invalid response code received from SMTP (outbound mail) server while attempting to send email.  This is often caused by a misconfiguration in the CiviCRM Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP)." code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
)

[/code]
« Last Edit: April 02, 2009, 09:04:10 pm by Whygee »

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Mailing not starting... but SMTP seems to be working
April 03, 2009, 12:30:43 am
Please edit the 122nd line of packages/Mail/smtp.php and change the $debug variable to true:

Code: [Select]
    var $debug = false;

Maybe this will tell you what is the exact problem with your SMTP configuration.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Whygee

  • Guest
Re: Mailing not starting... but SMTP seems to be working
April 03, 2009, 07:56:37 am
Here's the output:
Code: [Select]
DEBUG: Recv: 220-box362.bluehost.com ESMTP Exim 4.69 #1 Fri, 03 Apr 2009 08:53:24 -0600 DEBUG: Recv: 220-We do not authorize the use of this system to transport unsolicited, DEBUG: Recv: 220 and/or bulk e-mail. DEBUG: Send: EHLO www.vertquebec.org DEBUG: Recv: 250-box362.bluehost.com Hello box362.bluehost.com [69.89.31.162] DEBUG: Recv: 250-SIZE 52428800 DEBUG: Recv: 250-PIPELINING DEBUG: Recv: 250-AUTH PLAIN LOGIN DEBUG: Recv: 250-STARTTLS DEBUG: Recv: 250 HELP DEBUG: Send: AUTH LOGIN DEBUG: Recv: 334 VXNlcm5hbWU6 DEBUG: Send: […] DEBUG: Recv: 334 UGFzc3dvcmQ6 DEBUG: Send: […] DEBUG: Recv: 235 Authentication succeeded DEBUG: Send: RSET DEBUG: Recv: 250 Reset OK DEBUG: Send: RSET DEBUG: Recv: 250 Reset OK DEBUG: Send: RSET DEBUG: Recv: 250 Reset OK DEBUG: Send: RSET DEBUG: Recv: 250 Reset OK DEBUG: Send: RSET DEBUG: Recv: 250 Reset OK DEBUG: Send: RSET DEBUG: Recv: 250 Reset OK DEBUG: Send: RSET DEBUG: Recv: 250 Reset OK DEBUG: Send: RSET DEBUG: Recv: 250 Reset OK DEBUG: Send: RSET DEBUG: Recv: 250 Reset OK DEBUG: Send: RSET DEBUG: Recv: 250 Reset OK DEBUG: Send: RSET DEBUG: Recv: 250 Reset OK DEBUG: Send: RSET DEBUG: Recv: 554 Too many nonmail commands DEBUG: Send: RSET ...

I've also asked tech support to see the SMTP logs and they said there was no emails coming thru from the address I use.
« Last Edit: April 17, 2009, 12:32:01 pm by Piotr Szotkowski »

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Mailing not starting... but SMTP seems to be working
April 08, 2009, 04:12:27 am
Quote from: Whygee on April 03, 2009, 07:56:37 am
Code: [Select]
[…]
DEBUG: Recv: 235 Authentication succeeded
DEBUG: Send: RSET
DEBUG: Recv: 250 Reset OK

Up to this place it looks ok.

Quote
Code: [Select]
DEBUG: Send: RSET
DEBUG: Recv: 250 Reset OK
DEBUG: Send: RSET
DEBUG: Recv: 250 Reset OK
DEBUG: Send: RSET
DEBUG: Recv: 250 Reset OK
DEBUG: Send: RSET
DEBUG: Recv: 250 Reset OK
DEBUG: Send: RSET
DEBUG: Recv: 250 Reset OK
DEBUG: Send: RSET
DEBUG: Recv: 250 Reset OK
DEBUG: Send: RSET
DEBUG: Recv: 250 Reset OK
DEBUG: Send: RSET
DEBUG: Recv: 250 Reset OK
DEBUG: Send: RSET
DEBUG: Recv: 250 Reset OK
DEBUG: Send: RSET
DEBUG: Recv: 250 Reset OK
DEBUG: Send: RSET
DEBUG: Recv: 554 Too many nonmail commands
DEBUG: Send: RSET ...

Now this looks clearly wrong, and it’s no wonder the server gives up in the end with a 554 result.

I dug into the PEAR classes we use for SMTP, and it looks like it’s the Net_SMTP’s rset() function that’s misbehaving (but, apparently, only in your host’s case).

Please edit the packages/Net/SMTP.php file, and where the 1017th line starts the rset() function, change it from

Code: [Select]
    function rset()
    {
        if (PEAR::isError($error = $this->_put('RSET'))) {
            return $error;
        }
        if (PEAR::isError($error = $this->_parseResponse(250, $this->pipelining))) {
            return $error;
        }

        return true;
    }

to

Code: [Select]
    function rset()
    {
        return true;
        if (PEAR::isError($error = $this->_put('RSET'))) {
            return $error;
        }
        if (PEAR::isError($error = $this->_parseResponse(250, $this->pipelining))) {
            return $error;
        }

        return true;
    }

– i.e., make the function return true right away; maybe it’ll make this problem go away.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Whygee

  • Guest
Re: Mailing not starting... but SMTP seems to be working
April 10, 2009, 12:19:49 pm
thanks for your suggestion. I've changed the code, but I'm still not receiving the test mailing message.

What bugs me is that it used to work on my old install so it should work with my host.

Maybe I should reconfigure everything from the start or look for professional help.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Mailing not starting... but SMTP seems to be working
April 13, 2009, 04:18:37 am
Quote from: Whygee on April 10, 2009, 12:19:49 pm
thanks for your suggestion. I've changed the code, but I'm still not receiving the test mailing message.

Is the debug output the same? What the above fix did was to return early from the RSET call, so it shouldn’t be stuck in the RSET loop that made the SMTP server drop the connection.

Quote
What bugs me is that it used to work on my old install so it should work with my host.

Maybe I should reconfigure everything from the start or look for professional help.

It’s definitely some bad interaction between CiviCRM (or, rather, the PEAR packages we ship) and your SMTP server, so you need to debug what exactly triggers the misbehaviour.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Whygee

  • Guest
Re: Mailing not starting... but SMTP seems to be working
April 14, 2009, 12:28:55 pm
Sorry, I forgot to paste the new output:

Code: [Select]
DEBUG: Recv: 220-box362.bluehost.com ESMTP Exim 4.69 #1 Tue, 14 Apr 2009 13:28:06 -0600 DEBUG: Recv: 220-We do not authorize the use of this system to transport unsolicited, DEBUG: Recv: 220 and/or bulk e-mail. DEBUG: Send: EHLO www.vertquebec.org DEBUG: Recv: 250-box362.bluehost.com Hello 70-40-205-24.bluehost.com [70.40.205.24] DEBUG: Recv: 250-SIZE 52428800 DEBUG: Recv: 250-PIPELINING DEBUG: Recv: 250-AUTH PLAIN LOGIN DEBUG: Recv: 250-STARTTLS DEBUG: Recv: 250 HELP DEBUG: Send: AUTH LOGIN DEBUG: Recv: 334 VXNlcm5hbWU6 DEBUG: Send: […] DEBUG: Recv: 334 UGFzc3dvcmQ6 DEBUG: Send: […] DEBUG: Recv: 235 Authentication succeeded DEBUG: Send: QUIT DEBUG: Recv: 221 box362.bluehost.com closing connection
« Last Edit: April 17, 2009, 12:32:29 pm by Piotr Szotkowski »

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Mailing not starting... but SMTP seems to be working
April 17, 2009, 12:35:48 pm
Quote from: Whygee on April 14, 2009, 12:28:55 pm
Sorry, I forgot to paste the new output:

Code: [Select]
[…]
DEBUG: Recv: 235 Authentication succeeded
DEBUG: Send: QUIT
DEBUG: Recv: 221 box362.bluehost.com closing connection

Ok, I dug deeper into the PEAR Net and Mail classes and the above most probably means that the ‘235 Authentication succeeded’ response is not treated as a successful one by PEAR (hence the RSET commands before and the QUIT one above).

Please revert the rset() function to the state it had before, and you need to debug (or get someone to debug) why the _authLogin() function in the packages/Net/SMTP.php file’s 648th line does not work as expected (if it’s indeed the place that breaks). From what I see this function should properly parse a 235 response… :(
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Mailing not starting... but SMTP seems to be working

This forum was archived on 2017-11-26.