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.
-
I'm having the exact problem. did you manage to find a fix? – SamChen May 07 '14 at 04:46
4 Answers
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)","john.doe@mailservername.com"
Fields separated by ,
Enclosed by "
-
2
-
Note that any of the fields (columns) mentioned can be used. It even works with only one field (e.g. `"E-mail Address"`). – Marten Koetsier Feb 08 '18 at 09:23
-
Import will fail if there are extra spaces between komma and " So: "John Doe", "john.doe@mailservername.com" will fail. – Peter Bakker Jul 29 '19 at 15:13
-
You can do without ": John Doe,john.doe@mailservername.com will also be imported. – Peter Bakker Jul 29 '19 at 15:20
-
For anyone who lands here just like I did: you can use CSV to vCard converter and this one worked for me very well.

- 11
- 1
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...

- 41
- 3
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

- 1,267
- 1
- 14
- 36