Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Invalid/Opted out email id

  1. #1
    qmv
    qmv is offline Senior Member
    Join Date
    Dec 2008
    Posts
    24

    Exclamation Invalid/Opted out email id

    Is there a way to search which leads/contacts/targets etc..have invalid or opted out set for their email id's.
    I"d like to export a list for these.

    Thank you

  2. #2
    qmv
    qmv is offline Senior Member
    Join Date
    Dec 2008
    Posts
    24

    Default Re: Invalid/Opted out email id

    moderator please help on this!!!

  3. #3
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Invalid/Opted out email id

    It is possible, but you will need to add the fields opted out / invalid on the contacts Search Form.
    For this purpose you will need to customize some scripts, in an upgrade safe way.

    Let us know if you need further informations.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  4. #4
    qmv
    qmv is offline Senior Member
    Join Date
    Dec 2008
    Posts
    24

    Default Re: Invalid/Opted out email id

    Hi andopes,

    Can you let me know how to add those fields to the source files?

    Thanks for your help

  5. #5
    qmv
    qmv is offline Senior Member
    Join Date
    Dec 2008
    Posts
    24

    Default Re: Invalid/Opted out email id

    Quote Originally Posted by andopes View Post
    It is possible, but you will need to add the fields opted out / invalid on the contacts Search Form.
    For this purpose you will need to customize some scripts, in an upgrade safe way.

    Let us know if you need further informations.

    Cheers

    Andopes your help on this will be appreciated...Thank you in advance

  6. #6
    qmv
    qmv is offline Senior Member
    Join Date
    Dec 2008
    Posts
    24

    Default Re: Invalid/Opted out email id

    Quote Originally Posted by andopes View Post
    It is possible, but you will need to add the fields opted out / invalid on the contacts Search Form.
    For this purpose you will need to customize some scripts, in an upgrade safe way.

    Let us know if you need further informations.

    Cheers
    andopes help ?

  7. #7
    zaska's Avatar
    zaska is offline Senior Member
    Join Date
    Sep 2008
    Posts
    99

    Thumbs up Re: Invalid/Opted out email id

    One solution:

    Edit custom/modules/Contacts/metadata/searchdefs.php and in the advanced_search array add:

    PHP Code:
          'opted_email' =>
          array (
            
    'name' => 'opted_email',
            
    'label' => 'LBL_OPTED_EMAIL',
            
    'type' => 'bool',
            
    'default' => true,
          ),
          
    'invalid_email' =>
          array (
            
    'name' => 'invalid_email',
            
    'label' => 'LBL_INVALID_EMAIL',
            
    'type' => 'bool',
            
    'default' => true,
          ), 
    Then copy modules/Contacts/metadata/metafiles.php to custom/modules/Contacts/metadata. Change the location of searchfields there:
    PHP Code:

            
    'searchfields'    =>    'custom/modules/Contacts/metadata/SearchFields.php'
    Copy modules/Contacts/metadata/SearchFields.php to custom/modules/Contacts/metadata and add these:

    PHP Code:
                    'opted_email'=> array(
                            
    'query_type' => 'default',
                            
    'operator' => 'subquery',
                            
    'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.opt_out =',
                            
    'db_field' => array(
                                    
    'id',
                            )
                    ),
                    
    'invalid_email'=> array(
                            
    'query_type' => 'default',
                            
    'operator' => 'subquery',
                            
    'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.invalid_email =',
                            
    'db_field' => array(
                                    
    'id',
                            )
                    ), 
    Add the new LBLs:
    custom/modules/Contacts/language/en_us.lang.php:
    PHP Code:
    <?php
    $mod_strings 
    = array (
      
    'LBL_OPTED_EMAIL' => 'Opted Out',
      
    'LBL_INVALID_EMAIL' => 'Invalid Email',
    );
    ?>

  8. #8
    mmllcid1 is offline Member
    Join Date
    Aug 2009
    Posts
    9

    Default Re: Invalid/Opted out email id

    i followed these instructions and i got opt out and invalid email to show up on my advanced contacts search page, however when i try to query using these fields, i get an error saying:
    SQL Error : Invalid column name 'invalid_email'.

    HELP!!!!

  9. #9
    mmllcid1 is offline Member
    Join Date
    Aug 2009
    Posts
    9

    Default Re: Invalid/Opted out email id

    bump.... anyone know how to fix the SQL error?

  10. #10
    mmllcid1 is offline Member
    Join Date
    Aug 2009
    Posts
    9

    Default Re: Invalid/Opted out email id

    still trying to figure out why the code above from zaska give this error:
    SQL Error : Invalid column name 'invalid_email'.

    if i follow the above instructions but make the edits in the modules rather than CUSTOM/modules i get a different SQL error.

    I get this:
    SQL Error : Conversion failed when converting the varchar value '1%' to data type bit. (when selecting yes)
    and
    SQL Error : Conversion failed when converting the varchar value '0%' to data type bit. (when selecting no)

    So i can see that it is taking the 1 or 0 depending on if I pick yes or no but it adds a '%' sign that makes the where clause think its varchar instead of boolean.

    can ANYONE help solve this? please please please!!!!!
    Last edited by mmllcid1; 2009-09-25 at 03:13 PM.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. opt out/invalid email
    By LuciaD in forum Italiano
    Replies: 2
    Last Post: 2009-08-11, 04:12 PM
  2. Replies: 1
    Last Post: 2009-05-11, 11:19 AM
  3. Continue email to opted-out targets
    By ivy.ng in forum Marketing/Campaign Management
    Replies: 1
    Last Post: 2008-02-29, 01:47 PM
  4. Invalid Value: email
    By madremedy in forum General Discussion
    Replies: 0
    Last Post: 2007-02-07, 10:34 AM
  5. Replies: 2
    Last Post: 2006-10-31, 03:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •