Email campagin won't send (or queue all emails)

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • lucakuehne
    replied
    I changed the column 'lower' to utf8mb4_unicode_ci, but in the 'email_address' table and not in the 'email' table.
    And that did the trick. The emails are now getting sent. :-)

    EDIT: Sorry for the missleady typo! The emails ARE getting sent
    Last edited by lucakuehne; 04-01-2020, 02:26 PM.

    Leave a comment:


  • yuri
    replied
    Try to convert column 'lower' in 'email' table to utf8mb4_unicode_ci. Make a backup of the table just in case. This may take a while if you have a big table.

    Leave a comment:


  • lucakuehne
    replied
    I'm running a MariaDB 10.3.16

    Leave a comment:


  • yuri
    replied
    What mysql version do you have?

    Leave a comment:


  • lucakuehne
    replied
    I did change those things.
    And I got the bad email address. The only thing which might cause an exception is a "é" in the email address... It is is a valid character, but it might cause some problems...

    Leave a comment:


  • yuri
    replied
    Hi Luca,

    Please replace the file again: https://raw.githubusercontent.com/es.../MassEmail.php. I made a few changes to it.

    Then.

    Add to this line: https://github.com/espocrm/espocrm/blob/hotfix/5.8.5/application/Espo/Modules/Crm/Services/MassEmail.php#L179

    the following code:
    PHP Code:
    $GLOBALS['log']->error('Item count: 'count($itemList)); 


    Wrap this line https://github.com/espocrm/espocrm/b...Email.php#L185 with try catch

    PHP Code:
    try {
         
    $emailAddressRecord $this->getEntityManager()->getRepository('EmailAddress')->getByAddress($emailAddress);
    } catch (
    \Exception $e) {
       
    $GLOBALS['log']->error('Bad email address: ' $emailAddress);
       throw new 
    \Exception($e->getMessage());

    Leave a comment:


  • lucakuehne
    replied
    Hi Yuri

    Yes it does indeed stop ervery time after it has processed 621 contacts.
    But how can I determine at which contact the proccess fails? I don't really see the logic on how the mass email processes the target items...
    Last edited by lucakuehne; 04-01-2020, 07:21 AM.

    Leave a comment:


  • yuri
    replied
    Does it process the same number of targets every time? Maybe the error occurs at a specific record?

    Leave a comment:


  • lucakuehne
    replied
    I replaced the file and restarted the apache, but the error still occurs.

    Leave a comment:


  • yuri
    replied
    Try to replace application/Espo/Modules/Crm/Services/MassEmail.php file with this one: https://raw.githubusercontent.com/es.../MassEmail.php'

    It's from the next version, maybe it will help.

    Leave a comment:


  • lucakuehne
    replied
    Originally posted by yurikuzn
    Do you have the latest version of EspoCRM?
    Yes, version 5.8.4


    Originally posted by yurikuzn
    Please check the collations of the following columns in database:
    table: contact
    column: id

    table: contact_target_list
    column: contact_id
    I checked them and they are they same:
    contact.id => utf8_unicode_ci
    contact_target_list.contact_id => utf8_unicode_ci

    Leave a comment:


  • yuri
    replied
    Please check the collations of the following columns in database:

    table: contact
    column: id

    table: contact_target_list
    column: contact_id

    Leave a comment:


  • yuri
    replied
    Do you have the latest version of EspoCRM?

    Leave a comment:


  • yuri
    replied
    It's an ID of MassEmail record

    Leave a comment:


  • lucakuehne
    replied
    Originally posted by yurikuzn
    Seems the mysql error is a culprit. Must be different collations are used for some columns in database. I don't know where yet.
    So let's find out together :-) I'll help you as much as I can.

    Originally posted by yurikuzn
    What entity types the faulty campaign has in the target list. Only contacts or mix of different entity types?
    Just contacts and some leads.
    I just removed the leads from the target list. The scheduled job for the processing of the mass emails did just run, but nothing different. I also recreated a new mass mail record. Just to be sure to have a clean record to start with. But saddly still the same error in the logs...

    Also another question: What is the UID in the log entry? Is this the ID of the scheduled job or, the running job instance? Or the mass email or the contact?
    EDIT: I just figured out the UID is the ID of the mass email
    Last edited by lucakuehne; 03-31-2020, 01:54 PM.

    Leave a comment:

Working...