I implemented roundcube mail as a mail manager on a virtual private server of mine. Everything works fine, but the address book import utility. After extracting the CSV file from my desktop pc address book, I follow the instruction to import contacts: address book, import, browse, import button. The procedure works until "browse". When I press the import button, it reloads the import page and no contact has been imported. do you have any experience about that? Am I missing anything in the roundcube config? Maybe a tmp folder where to upload csv, vcf files? Permissions? I have checkd and I have a tmp folder in the root of roundcube, set to 777. Users of my server are getting frustrated and really don't know what's not working. Thank for your preciuos help.
importing address book in roundcube doesn't do anything
18.1k views Asked by Aptivus At
4
There are 4 answers
0
On
I used a small script to convert csv file to vcard:
#!/usr/bin/env ruby
require 'csv'
raw = File.read('OutlookContacts.csv')
# 1 - First Name
# 3 - Last Name
# 37 - Mobile Phone
# 47 - E-mail Address
csv = CSV.parse(raw)
csv.each_with_index do |line,i|
next if i == 0
puts "BEGIN:VCARD"
puts "VERSION:3.0"
puts "N:#{line[3]};#{line[1]};;;"
#puts "FN:Name to show"
puts "EMAIL;type=INTERNET;type=HOME:#{line[47]}"
#puts "ORG:company"
puts "TEL;type=CELL:#{line[37]}"
#puts "TEL;type=home:home phone"
puts "END:VCARD"
end
5
On
Use the right columns: https://github.com/roundcube/roundcubemail/blob/master/program/localization/en_US/csv2vcard.inc The .csv MUST look like this (header line is absolutely necessary!) The import is case sensitive.
"First Name","Last Name","Display Name","E-mail Address"
"John","Doe","John Doe (private)","[email protected]"
Fields separated by ,
Enclosed by "
Roundcube can only handle CSV-Files generated by Outlook, Thunderbird or Atmail. If the file has not the correct column headers, it will do nothing. I also ran into this before.
If you want make your own CSV, be sure to use the Column Headers one of the mentioned apps would. The order is irrelevant.
To have a List of all possible Header-Names look at the source: https://github.com/roundcube/roundcubemail/blob/master/program/lib/Roundcube/rcube_csv2vcard.php starting from Line 159.
Name the columns "E-mail Address" and "First Name" and so on...