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 CiviMember (Moderator: Deepak Srivastava) »
  • UpdateMembershipRecord Script - smtp error ..
Pages: [1]

Author Topic: UpdateMembershipRecord Script - smtp error ..  (Read 2565 times)

rguerra

  • Guest
UpdateMembershipRecord Script - smtp error ..
August 15, 2008, 11:27:47 am
Hi all:

After a long delay, I had a little bit of time to upgrade the civicrm and drupal codebase for the CPSR membership management system (cpsr.net) that is hosted on dreamhost.

I was able to install civimail (with all the php & perl custom builds) and get it to work as well as civimembership. However, I have an outstanding issue with running the  UpdateMembershipRecord  script - one that I can't seem to be able to resolve.

let me explain the issue - I have a daily cron job that runs the membership update script (username & password has been removed) . i runs, however it doesn't complete due to an error.

I run the script this way -

/usr/bin/lynx -source 'http://cpsr.net/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php?name=<username>&pass=<password>'

With the backtrace option turned on, i get the result below. Any help in debugging and/or resolving the issue will be - VERY - appreciated.

regards

Robert
---



Updating ...<p>backTrace</p><p><pre>/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 148
, handle,
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 901
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/packages/PEAR.php, PEAR_Error, 566
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/packages/Net/SMTP.php, raiseError, 278
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/packages/Net/SMTP.php, _parseResponse, 742
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/packages/Mail/smtp.php, rcptTo, 288
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/CRM/Core/BAO/MessageTemplates.php, send, 275
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php, sendReminder, 135
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php, updateMembershipStatus, 173</pre></p><p></p><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
 <title></title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <base href="https://cpsr.net/sites/all/modules/civicrm/" />
 <style type="text/css" media="screen">@import url(https://cpsr.net/sites/all/modules/civicrm/css/civicrm.css);</style>
</head>

<body>

<div id="crm-container" lang="en" xml:lang="en">

<div class="messages status">
 <dl>
 <dt><img src="https://cpsr.net/sites/all/modules/civicrm/i/Error.gif" alt="unrecoverable error" /></dt>
 <dd>
     Sorry. A non-recoverable error has occurred.      <p>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).</p>
     <p><a href="https://cpsr.net/" title="Main Menu">Return to home page.</a></p>
 </dd>
 </dl>
</div>

</div>
</body>
</html><p>Error Details:</p><p><pre>Array
(
   [callback] =&gt; Array
       (
           
  • =&gt; CRM_Core_Error
  • [1] =&gt; handle
           )

       
Code: [Select]
=&gt;
   [message] =&gt; 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 &gt;&gt; Global Settings &gt;&gt; Outbound Email (SMTP).
   [mode] =&gt; 16
   [debug_info] =&gt;
   [type] =&gt; PEAR_Error
   [user_info] =&gt;
   [to_string] =&gt; [pear_error: message=&quot;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 &gt;&gt; Global Settings &gt;&gt; Outbound Email (SMTP).&quot; code=0 mode=callback callback=CRM_Core_Error::handle prefix=&quot;&quot; info=&quot;&quot;]
)
</pre></p><p></p>

rguerra

  • Guest
Re: UpdateMembershipRecord Script - smtp error ..
August 15, 2008, 12:17:09 pm
Further to my earlier message.. I set var $_debug = true; in sites/all/modules/civicrm/packages/Net/SMTP.php and then ran the update script.

More details related to the SMTP transaction appeared (see below) , which lead me to see that there might be a bug in civicrm. Specifically - email fields with incomplete addresses (ie. no @ or anything after it) lead to the script stopping. I mention this, as when I removed the  entry with the incomplete email address - the script then worked fine.

Thus -recommend that email field is OK before sending it out via the update script. If there's a problem skip it - instead of halting the whole script.

regards

Robert


Code: [Select]

Updating ...DEBUG: Recv: 220 npomail1-in.electricembers.net ESMTP Postfix
DEBUG: Send: EHLO cpsr.net

DEBUG: Recv: 250-npomail1-in.electricembers.net
DEBUG: Recv: 250-PIPELINING
DEBUG: Recv: 250-SIZE 100000000
DEBUG: Recv: 250-VRFY
DEBUG: Recv: 250-ETRN
DEBUG: Recv: 250-STARTTLS
DEBUG: Recv: 250-AUTH LOGIN PLAIN
DEBUG: Recv: 250-AUTH=LOGIN PLAIN
DEBUG: Recv: 250-ENHANCEDSTATUSCODES
DEBUG: Recv: 250-8BITMIME
DEBUG: Recv: 250 DSN
DEBUG: Send: AUTH LOGIN

DEBUG: Recv: 334 XXXXXXXXXXXXXXXXXXXXXXXX

DEBUG: Send: XXXXXXXXXXXXXXXXXXXXXXXX


DEBUG: Recv: 334 XXXXXXXXXXXXXXXXXXXXXXXX

DEBUG: Send: XXXXXXXXXXXXXXXXXXXXXXXX

DEBUG: Recv: 235 2.0.0 Authentication successful
DEBUG: Send: MAIL FROM:<office@cpsr.org>

DEBUG: Recv: 250 2.1.0 Ok
DEBUG: Send: RCPT TO:<angelica@localhost>

DEBUG: Recv: 550 5.1.1 <angelica@localhost>: Recipient address rejected: User unknown in local recipient table
<p>backTrace</p><p><pre>/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 148
, handle,
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 901
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/packages/PEAR.php, PEAR_Error, 566
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/packages/Net/SMTP.php, raiseError, 278
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/packages/Net/SMTP.php, _parseResponse, 742
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/packages/Mail/smtp.php, rcptTo, 288
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/CRM/Core/BAO/MessageTemplates.php, send, 275
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php, sendReminder, 135
/home/.mogg/rguerra/websites/cpsr2008/sites/all/modules/civicrm/bin/UpdateMembershipRecord.php, updateMembershipStatus, 173</pre></p><p></p><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
 <title></title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <base href="https://cpsr.net/sites/all/modules/civicrm/" />
 <style type="text/css" media="screen">@import url(https://cpsr.net/sites/all/modules/civicrm/css/civicrm.css);</style>
</head>

<body>

<div id="crm-container" lang="en" xml:lang="en">

<div class="messages status">
 <dl>
 <dt><img src="https://cpsr.net/sites/all/modules/civicrm/i/Error.gif" alt="unrecoverable error" /></dt>
 <dd>
     Sorry. A non-recoverable error has occurred.      <p>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).</p>
     <p><a href="https://cpsr.net/" title="Main Menu">Return to home page.</a></p>
 </dd>
 </dl>
</div>

</div>
</body>
</html><p>Error Details:</p><p><pre>Array
(
   [callback] =&gt; Array
       (
           [0] =&gt; CRM_Core_Error
           [1] =&gt; handle
       )

   [code] =&gt;
   [message] =&gt; 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 &gt;&gt; Global Settings &gt;&gt; Outbound Email (SMTP).
   [mode] =&gt; 16
   [debug_info] =&gt;
   [type] =&gt; PEAR_Error
   [user_info] =&gt;
   [to_string] =&gt; [pear_error: message=&quot;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 &gt;&gt; Global Settings &gt;&gt; Outbound Email (SMTP).&quot; code=0 mode=callback callback=CRM_Core_Error::handle prefix=&quot;&quot; info=&quot;&quot;]
)
</pre></p><p></p>DEBUG: Send: QUIT

DEBUG: Recv: 221 2.0.0 Bye



[/code]

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: UpdateMembershipRecord Script - smtp error ..
August 15, 2008, 12:25:54 pm

Can you post an issue against 2.1 and we'll fix it for the new release. You can track the issue and backport the patch

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

rguerra

  • Guest
Re: UpdateMembershipRecord Script - smtp error ..
August 15, 2008, 12:59:21 pm
Lobo - as requested an issue has been logged. Details @ http://issues.civicrm.org/jira/browse/CRM-3406

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: UpdateMembershipRecord Script - smtp error ..
August 18, 2008, 02:14:07 pm

Robert:

can you try this patch. this should fix your issue

http://fisheye.civicrm.org/browse/CiviCRM/trunk/CRM/Core/BAO/MessageTemplates.php?r1=16513&r2=16704

We currently ignore that we could not send a reminder. This behavior is a bit better than aborting. We'll do a rethink when we hit civimember phase 2

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: UpdateMembershipRecord Script - smtp error ..
August 21, 2008, 01:28:21 pm
Quote
We'll do a rethink when we hit civimember phase 2

Any indications when CiviMember Phase 2 might be addressed? There are quite a few areas which could be reviewed. Joint memberships, multiple membership signups...

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: UpdateMembershipRecord Script - smtp error ..
August 21, 2008, 02:06:19 pm
Quote from: speleo on August 21, 2008, 01:28:21 pm
Any indications when CiviMember Phase 2 might be addressed? There are quite a few areas which could be reviewed. Joint memberships, multiple membership signups...

no idea as yet.if i had to guess in 2.3 or 2.4 (slight chance of 2.2). However it depends on our other consulting gigs and/or folks willing to step up and sponsor improvements to civimember

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • UpdateMembershipRecord Script - smtp error ..

This forum was archived on 2017-11-26.