Page 1 of 1

Email list import function not working for me Centos 4

Posted: Mon Sep 18, 2006 3:50 am
by kevinloydw
I have installed Openemm, reinstalled... Only thing not working is the import function. I just get a generic website error when I try.

Thanks,
KLW

You may email me at kevinloydw@yahoo.com

Error in a debian install as well when trying import

Posted: Mon Sep 18, 2006 6:59 pm
by kevinloydw
Ein Fehler ist aufgetreten
Ursache: java.lang.NullPointerException

Re: Error in a debian install as well when trying import

Posted: Fri Dec 01, 2006 9:15 am
by greyhound
kevinloydw wrote:Ein Fehler ist aufgetreten
Ursache: java.lang.NullPointerException
I've got the same problem, therefore importet the recipients by hand. Here's how:

We use the german titles:
- Herr = for male recipients
- Frau = for female recipients.
- Familie = "Family" used for unknown gender

Since I do not have the gender as a digit in my CSV file I made an extra field in the database called tmp_title.



At first, have a look for the highest customer_id in the recipients table

Code: Select all

select max(customer_id) from customer_1_tbl;
write it down, we need it later on



I then transformed my CSV file into insert statements. A text editor supporting macros is very helpful ;)

A file like

Code: Select all

E-Mail;Cust.No.;Title;Degree;FirstName;LastName
foobar1@domain.com;10474134;Herr; ;Jim;Beam
foobar2@domain.com;10474135;Herr; :Jack;Daniels
foobar3@domain.com;10474136;Herr; :Johnny;Walker
[...]
should then look like

Code: Select all

insert into customer_1_tbl (email, customer_id, tmp_title, title, firstname, lastname, mailtype, creation_date, change_date) values ('foobar1@domain.com', '10474134', 'Herr', '', 'Jim', 'Beam', 1, '2006-11-28 10:15:00', '2006-11-28 10:15:00');
insert into customer_1_tbl (email, customer_id, tmp_title, title, firstname, lastname, mailtype, creation_date, change_date) values ('foobar2@domain.com', '10474135', 'Herr', '', 'Jack', 'Daniels', 1, '2006-11-28 10:15:00', '2006-11-28 10:15:00');
insert into customer_1_tbl (email, customer_id, tmp_title, title, firstname, lastname, mailtype, creation_date, change_date) values ('foobar3@domain.com', '10474136', 'Frau', '', 'Johnny', 'Walker', 1, '2006-11-28 10:15:00', '2006-11-28 10:15:00');
[...]
We can execute the inserts now


Now we tell OpenEMM about the recipient's gender

Code: Select all

update customer_1_tbl set gender='0' where tmp_title='Herr';
update customer_1_tbl set gender='1' where tmp_title='Frau';
update customer_1_tbl set gender='2' where tmp_title='Familie';
You could drop the field tmp_title now


Have a look for the mailinglist_id of the list where the new reciepients will be linked to

Code: Select all

SELECT * FROM mailinglist_tbl
In my case it's 2


Link the recipients to the list. Mind the digit "2" in the subselect

Code: Select all

insert into customer_1_binding_tbl 
(customer_id, mailinglist_id, user_type, user_status, user_remark, creation_date, exit_mailing_id, mediatype)
select customer_id,  2, 'W', 1, 'Import per SQL', '2006-11-28 11:10:00', 0, 0 
from customer_1_tbl where customer_id > MAXIMUM_CUSTOMER_ID_FROM_ABOVE;
At last, update the sequence

Code: Select all

insert into customer_1_tbl_seq
(customer_id)
select customer_id
from customer_1_tbl where customer_id > MAXIMUM_CUSTOMER_ID_FROM_ABOVE;

That's it.

address import

Posted: Mon Dec 04, 2006 11:24 am
by maschoff
Import works in general. What does not work (see bug tracker) is an update of already imported profiles, but you can add new profiles. Bug will be fixed in next version.