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 CiviEvent (Moderator: Yashodha Chaku) »
  • CiviEvent confirmation email fails (SMTP authentication issue) [SOLVED]
Pages: [1]

Author Topic: CiviEvent confirmation email fails (SMTP authentication issue) [SOLVED]  (Read 2460 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
CiviEvent confirmation email fails (SMTP authentication issue) [SOLVED]
July 25, 2010, 04:23:38 pm
Cause: the CiviEvent confirmations were failing due to a combination of 3 factors...
  • I installed 'php-mcrypt' on my server, in order to use reCAPTCHA MailHide
  • I am currently running Joomla and
  • I had set the CIVICRM_SITE_KEY in the 'administrator/components' copy of civicrm, but not the 'components' copy. (I hadn't imagined the Joomla front-end would need the site key!)

When mcrypt is available and the Site Key is defined, CiviCRM encrypts the mail password. Otherwise it leaves it in the clear. This explains why, after installing mcrypt, all email transmission failed until I updated the mail password (CiviCRM in the Joomla backend was expecting the password to be encrypted when it wasn't) and then afterwards only the CiviEvent emails failed (CiviCRM in the Joomla frontend was expecting the password to be in the clear when it wasn't).

I've updated the v3.2 version of http://wiki.civicrm.org/confluence/display/CRMDOC/Command-line+Script+Configuration which is currently at http://wiki.civicrm.org/confluence/display/CRMUPCOMING/Command-line+Script+Configuration to advise Joomla users to put the same site key in both settings files.



This is weird because all other emails work (I can send a test email when setting the Outbound Email settings, I can send CiviMails, emails from within Civi, etc)

When anyone registers for an event they get a screen message saying...

Code: [Select]
authentication failure [SMTP: Authentication failed. (code: 221, response: 2.0.0 Bye)]

My mail logs show ('xxxx' is my hostname)...

Code: [Select]
Jul 25 23:17:58 xxxx postfix/smtpd[6572]: connect from localhost[127.0.0.1]
Jul 25 23:18:02 xxxx postfix/smtpd[6572]: warning: localhost[127.0.0.1]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Jul 25 23:18:02 xxxx postfix/smtpd[6572]: disconnect from localhost[127.0.0.1]

...where "UGFzc3dvcmQ6" is the base64 encoding of "Password:".

The CiviCRM error log includes about 5Mb of text, which includes ('45587' is the internal port I use rather than '25', and username/password is obfuscated)...

Code: [Select]
           [3] => Array
                (
                    [file] => /var/www/xxxx/administrator/components/com_civicrm/civicrm/packages/Net/SMTP.php
                    [line] => 579
                    [function] => _authLogin
                    [class] => Net_SMTP
                    [object] => Net_SMTP Object
                        (
                            [host] => localhost
                            [port] => 45587
                            [localhost] => xxxx
                            [auth_methods] => Array
                                (
                                    [0] => DIGEST-MD5
                                    [1] => CRAM-MD5
                                    [2] => LOGIN
                                    [3] => PLAIN
                                )

                            [pipelining] =>
                            [_pipelined_commands] => 0
                            [_debug] =>
                            [_debug_handler] =>
                            [_socket] => Net_Socket Object
                                (
                                    [fp] =>
                                    [blocking] => 1
                                    [persistent] =>
                                    [addr] => 127.0.0.1
                                    [port] => 45587
                                    [timeout] =>
                                    [lineLength] => 2048
                                    [_debug] =>
                                    [_default_error_mode] =>
                                    [_default_error_options] =>
                                    [_default_error_handler] =>
                                    [_error_class] => PEAR_Error
                                    [_expected_errors] => Array
                                        (
                                        )

                                )

                            [_code] => 221
                            [_arguments] => Array
                                (
                                    [0] => 2.0.0 Bye
                                )

                            [_greeting] => citybibleforum.org ESMTP
                            [_esmtp] => Array
                                (
                                    [xxxx] =>
                                    [SIZE] => 10240000
                                    [VRFY] =>
                                    [ETRN] =>
                                    [AUTH] => PLAIN LOGIN
                                    [ENHANCEDSTATUSCODES] =>
                                    [8BITMIME] =>
                                    [DSN] =>
                                )

                        )

                    [type] => ->
                    [args] => Array
                        (
                            [0] => username
                            [1] => password
                        )

                )

The 'password' is something I don't recognise: it doesn't match either the password I entered, nor the password as stored in civicrm_preferences.mailing_backend.

The trace back is...

Code: [Select]
Jul 25 21:54:36  [info] $backTrace = /var/www/citybibleforum/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php, backtrace, 471
, nullHandler,
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/packages/PEAR.php, call_user_func, 931
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/packages/PEAR.php, PEAR_Error, 566
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/packages/Mail/smtp.php, raiseError, 248
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/CRM/Utils/Mail.php, send, 138
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/MessageTemplates.php, send, 447
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/CRM/Event/BAO/Event.php, sendTemplate, 1048
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php, sendMail, 749
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php, postProcess, 250
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/CRM/Core/StateMachine.php, mainProcess, 167
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php, perform, 64
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php, handle, 263
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php, run, 215
/var/www/citybibleforum/components/com_civicrm/civicrm.php, invoke, 81
/var/www/citybibleforum/components/com_civicrm/civicrm.php, civicrm_invoke, 24
/var/www/citybibleforum/libraries/joomla/application/component/helper.php, require_once, 162
/var/www/citybibleforum/includes/application.php, renderComponent, 124
/var/www/citybibleforum/index.php, dispatch, 68

Jul 25 21:54:36  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] =>
    [message] => not connected
    [mode] => 16
    [debug_info] =>
    [type] => PEAR_Error
    [user_info] =>
    [to_string] => [pear_error: message="not connected" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
)


Jul 25 21:54:36  [info] $backTrace = /var/www/citybibleforum/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php, backtrace, 191
, handle,
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/packages/PEAR.php, call_user_func, 931
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/packages/PEAR.php, PEAR_Error, 566
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/packages/Net/Socket.php, raiseError, 327
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/packages/Net/SMTP.php, write, 229
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/packages/Net/SMTP.php, _send, 264
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/packages/Net/SMTP.php, _put, 427
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/packages/Mail/smtp.php, disconnect, 322
/var/www/citybibleforum/administrator/components/com_civicrm/civicrm/packages/Mail/smtp.php, disconnect, 177
, _Mail_smtp,

It's almost as if the code for sending a CiviEvent confirmation email is getting the password from a different source. This worked until Friday?![/code]
« Last Edit: July 26, 2010, 02:05:23 am by ken »

Rahul Bile

  • I post occasionally
  • **
  • Posts: 112
  • Karma: 16
  • impossible says, I M Possible
    • I AM POSSIBLE
Re: CiviEvent confirmation email fails (SMTP authentication issue)
July 25, 2010, 11:06:22 pm
Hey ken,

Can you double check "Confirm From Email" in settings of Online Registration  >> Confirmation email? Check for spelling mistake or a space in it?
Some of the servers need valid From address in order send emails.

Rahul.
« Last Edit: July 25, 2010, 11:08:34 pm by Kurund Jalmi »
Consider donating to CiviCRM if you use it. http://civicrm.org/donate

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: CiviEvent confirmation email fails (SMTP authentication issue)
July 26, 2010, 12:23:06 am
Rahul,

Thanks for your input. The error is occurring at the point of SASL Authentication, whereas From address validation occurs later in the exchange. I've checked one of the addresses as you suggested and it's OK.

Ken

bmw

  • I post occasionally
  • **
  • Posts: 103
  • Karma: 4
    • Alcohol Justice - The Industry Watchdog
  • CiviCRM version: 4.5.8
  • CMS version: Joomla! 3.4.0
  • MySQL version: 5.5.42-cli
  • PHP version: 5.3.27
Re: CiviEvent confirmation email fails (SMTP authentication issue) [SOLVED]
December 19, 2011, 07:49:32 pm

Was there any solution to this issue?

Bruce Wolfe, M.S.W., CIO
Alcohol Justice, 501(c)3

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: CiviEvent confirmation email fails (SMTP authentication issue) [SOLVED]
December 20, 2011, 12:20:44 pm
Bruce,

The solution I posted on July 25, 2010, at 03:23:38 pm was to set the same site key in both the Joomla front-end and back-end.

If that's not working for you, I'm not sure what to do. I've looked back at my notes and patches but can't find any reference to 'mcrypt'. As we've moved CMS from Joomla to Drupal, all that Joomla stuff has evaporated from my short-term memory.

Ken

bmw

  • I post occasionally
  • **
  • Posts: 103
  • Karma: 4
    • Alcohol Justice - The Industry Watchdog
  • CiviCRM version: 4.5.8
  • CMS version: Joomla! 3.4.0
  • MySQL version: 5.5.42-cli
  • PHP version: 5.3.27
Re: CiviEvent confirmation email fails (SMTP authentication issue) [SOLVED]
December 20, 2011, 01:09:11 pm
Okay, Thanks, Ken.
Bruce Wolfe, M.S.W., CIO
Alcohol Justice, 501(c)3

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • CiviEvent confirmation email fails (SMTP authentication issue) [SOLVED]

This forum was archived on 2017-11-26.