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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Contact Action Send an Email fails 4.5.1,4.5.5
Pages: [1]

Author Topic: Contact Action Send an Email fails 4.5.1,4.5.5  (Read 372 times)

ericross

  • I’m new here
  • *
  • Posts: 27
  • Karma: 0
  • civiadmin
    • National Day of Prayer New York
  • CiviCRM version: 4.6.2
  • CMS version: WordPress 4.1.1
  • MySQL version: 5.5.40-36.1
  • PHP version: 5.4.38
Contact Action Send an Email fails 4.5.1,4.5.5
January 26, 2015, 11:32:50 am
When I try to send an email from the Contact screen I get the syntax error below.


The query will process when the email address is surrounded by quotes so this looks like a simple issue.
         'no~...@...~cuny.edu' and not as it is no~...@...~cuny.edu

I had not unchecked the "Enable CiviMail to create activities on delivery" so didn't have the Bulk Mail tab for contacts. When I made this change, the pop-up email form doesn't populate the To" address of the Contact and I get the same error on send.

Manually adding '' to the email address does process a little further but then errors out with an erroneous message: Selected contact(s) do not have a valid email address, or communication preferences specify DO NOT EMAIL, or they are deceased or Primary email address is On Hold.

So no work around that I can see.

Array( [callback] => Array (
    • => CRM_Core_Error [1] => handle )
    Code: [Select]
    => -2 [message] => DB Error: syntax error [mode] => 16 [debug_info] => SELECT contact_a.id as contact_id, contact_a.sort_name  as `sort_name`, contact_a.display_name  as `display_name`, contact_a.do_not_email  as `do_not_email`, contact_a.preferred_mail_format  as `preferred_mail_format`, contact_a.is_deceased  as `is_deceased`, civicrm_email.id as email_id, civicrm_email.email as `email`, civicrm_email.on_hold as `on_hold`  FROM civicrm_contact contact_a LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1)  WHERE  (  ( contact_a.id IN (120,no~...@...~cuny.edu ) )  )   LIMIT 0, 2  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@...~cuny.edu ) )  )   LIMIT 0, 2' at line 1] [type] => DB_Error


      [/li]
    « Last Edit: January 26, 2015, 02:56:58 pm by ericross »
    Usability Matters.

    petednz

    • Forum Godess / God
    • I’m (like) Lobo ;)
    • *****
    • Posts: 4899
    • Karma: 193
      • Fuzion
    • CiviCRM version: 3.x - 4.x
    • CMS version: Drupal 6 and 7
    Re: Contact Action Send an Email fails 4.5.1
    January 26, 2015, 11:51:21 am
    Hi eric - sorry i don't have any specific insights in to your problem but i suspect anyone who does will still recommend that you upgrade to the latest 4.5 version and retest. It may not fix the issue but a lot of other bugs have been fixed since then
    Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

    pete davis : www.fuzion.co.nz : connect + campaign + communicate

    ericross

    • I’m new here
    • *
    • Posts: 27
    • Karma: 0
    • civiadmin
      • National Day of Prayer New York
    • CiviCRM version: 4.6.2
    • CMS version: WordPress 4.1.1
    • MySQL version: 5.5.40-36.1
    • PHP version: 5.4.38
    Re: Contact Action Send an Email fails 4.5.1, 4.5.5
    January 26, 2015, 02:10:16 pm
    Upgraded to 4.5.5 and get the same errors when I Send an Email from the Contact Actions menu.


    Tried a different format in the "To" box but same result.


    "N~..." <no~...@...~cuny.edu> fails with syntax error. Running the failed query with '"N~..." <no~...@...~cuny.edu>' returns the expected Contact record.


    4.5.5 upgrade had one glitch - couldn't create the CiviCase log table but I don't think that has any bearing here. Logging has been off and I had disabled CiviCase before the upgrade.
    « Last Edit: January 26, 2015, 02:14:34 pm by ericross »
    Usability Matters.

    petednz

    • Forum Godess / God
    • I’m (like) Lobo ;)
    • *****
    • Posts: 4899
    • Karma: 193
      • Fuzion
    • CiviCRM version: 3.x - 4.x
    • CMS version: Drupal 6 and 7
    Re: Contact Action Send an Email fails 4.5.1
    January 26, 2015, 02:12:51 pm
    what happens when you send test mail from civicrm/admin/setting/smtp?reset=1 - is that all working fine?
    Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

    pete davis : www.fuzion.co.nz : connect + campaign + communicate

    ericross

    • I’m new here
    • *
    • Posts: 27
    • Karma: 0
    • civiadmin
      • National Day of Prayer New York
    • CiviCRM version: 4.6.2
    • CMS version: WordPress 4.1.1
    • MySQL version: 5.5.40-36.1
    • PHP version: 5.4.38
    Re: Contact Action Send an Email fails 4.5.1, 4.5.5
    January 26, 2015, 02:24:01 pm
    Hmm,

    After the 4.5.5 upgrade I was able to set outgoing mail back to SMTP (only mail() was working in 4.5.1). After your response, I checked again and it failed. Something isn't right. No email, Code 535. Looks like a secondary issue with SMTP.

    My test mail goes to a gmail address but that has never been an issue.


    Oops, I had left CiviCase enabled so... Civicase and (see below) Configure extension are disabled.
    ran this  http://ndpny.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/clearcache and cleared all
    using SMTP at http://ndpny.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/setting/smtp&reset=1 and code: 535


    switch to mail() and it successfully sends






    When I went back to :
    http://ndpny.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/extensions&reset=1


    it responded with the API Profile screen I've seen before from CiviConfigure extension so I went to disable that extension and get this error.



    Database Error Code: Unknown column 'cleanup' in 'field list', 1054
    Additional Details:
    Array ( [callback] => Array ( 
    •  => CRM_Core_Error [1] => handle ) 
    Code: [Select]
    => -19 [message] => DB Error: no such field [mode] => 16 [debug_info] => INSERT INTO civicrm_managed (module , name , entity_type , entity_id , cleanup ) VALUES ('civicrm' , 'civicase:act:ADC Referral' , 'OptionValue' ,  1088 , 'unused' )  [nativecode=1054 ** Unknown column 'cleanup' in 'field list'] [type] => DB_Error [user_info] => INSERT INTO civicrm_managed (module , name , entity_type , entity_id , cleanup ) VALUES ('civicrm' , 'civicase:act:ADC Referral' , 'OptionValue' ,  1088 , 'unused' )  [nativecode=1054 ** Unknown column 'cleanup' in 'field list'] [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_managed (module , name , entity_type , entity_id , cleanup ) VALUES ('civicrm' , 'civicase:act:ADC Referral' , 'OptionValue' ,  1088 , 'unused' )  [nativecode=1054 ** Unknown column 'cleanup' in 'field list']"] )
      [/li]
    « Last Edit: January 26, 2015, 03:00:10 pm by ericross »
    Usability Matters.

    petednz

    • Forum Godess / God
    • I’m (like) Lobo ;)
    • *****
    • Posts: 4899
    • Karma: 193
      • Fuzion
    • CiviCRM version: 3.x - 4.x
    • CMS version: Drupal 6 and 7
    Re: Contact Action Send an Email fails 4.5.1
    January 26, 2015, 02:25:18 pm
    doubt i can help further but hopefully puts you and others on right track - perhaps update the Subject of this ticket too now
    Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

    pete davis : www.fuzion.co.nz : connect + campaign + communicate

    Pages: [1]
    • CiviCRM Community Forums (archive) »
    • Old sections (read-only, deprecated) »
    • Support »
    • Using CiviCRM »
    • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
    • Contact Action Send an Email fails 4.5.1,4.5.5

    This forum was archived on 2017-11-26.