Inserting Emails in MySQL from another table

I am inserting data in MySQL into the contacts module/table from another tables, but the ‘contacts’ table does not have an email address column. I see that ‘contacts_cstm’ and ‘contacts’ have a primary key ‘id’, but when I look at the email tables, I cannot find the corresponding primary key between contacts and email addresses.

So my question is how do I write the query that adds emails from my table to the contact’s emails table in SuiteCRM?

Below is the query I use to insert most of the fields

INSERT INTO contacts(
    id,
    first_name,
    last_name,
    photo,
    phone_home,
    phone_mobile,
    phone_fax,
    primary_address_street,
    primary_address_city,
    primary_address_state,
    primary_address_postalcode,
    birthdate,
    /*email would ideally go here in this query*/
)
SELECT
    ClientID,
    Firstname,
    Lastname,
    Photo,
    Homephone,
    Mobilephone,
    Fax,
    Address,
    City,
    `State/Prov`,
    Zipcode,
    DoB,
    Email1 ,
FROM
    exampletable;

Hi,

SuiteCRM stores the email address in a different way because SuiteCRM offers multiple email addresses for one record functionality.

SuiteCRM database has 2 tables:-

1. email_addresses - It saves the email address of the SuiteCRM
2. email_addr_bean_rel - It saves the relationship of email address and record.

The email_addr_bean_rel table has columns:-

1. email_address_id - Id of the email_addresses table
2. bean_id -  Id of the record (Contacts/Leads/ Accounts or custom module)
3. bean_module -  It gives the name of the module  (Contacts/Leads/ Accounts or custom module)

Thank You!