Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Mar 2002
    Posts
    448

    Default Need list of contact emails - but they don't appear in 'Fetch CSV' list?

    Hi All,

    I need to get all the hosting account contact email addresses out of WHM and into another package (12All newslettter subscriber list).

    I was hoping to use:

    WHM > List Accounts > Fetch CSV

    ... but, despite the fact that 'List Accounts' shows the contact email address, 'Fetch CSV' omits the email addresses.

    Does anyone know why the Fetch CSV list excludes email addresses? An oversight that needs fixing or is this intentional?

    Any other way of extracting contact email addresses?

    Thanks for your help.
    • Web Design Perth .:. Itomic Business Website Solutions of Perth, Western Australia

  2. #2
    Member sawbuck's Avatar
    Join Date
    Jan 2004
    Posts
    1,313
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Don't remember who gets credit for this one. Just remove the txt extension and do "sh extract".
    HTH
    Attached Files

  3. #3
    Member
    Join Date
    Mar 2002
    Posts
    448

    Default

    Sweet. Thanks sawbuck (you can get the credit as far as I'm concerned) :-)

    Here's the text in that file you attached:

    for i in `awk -F: '/home/ {print $1};' /etc/passwd`
    do
    email=`cat /home/$i/.contactemail`
    if test -n "$email"; then
    echo $email >> list.txt
    fi
    done

    I ran it, and it wrote a bunch of addresses out, but then choked when it found a directory in home that did not have a .contactemail file:

    cat: /home/merchant/.contactemail: No such file or directory

    ('merchant' is some e-commerce payment gateway software that we run that does not have an associated hosting account - not sure why we stuck it in /home but there you go!)

    At the risk of straining the friendship :-), how can I update the syntax to ignore when there is no .contactemail file? Apologies for my ignorance - my techy employee is not in today!

    Thanks again.

    ('Course, all this wouldn't be necessary if the 'fetch csv' had the email address in the first place as expected! Does anyone know why it doesn't???)
    • Web Design Perth .:. Itomic Business Website Solutions of Perth, Western Australia

  4. #4
    Member
    Join Date
    Mar 2002
    Posts
    448

    Default

    Ha! Got around the issue by creating dummy .contactemail file :-)
    • Web Design Perth .:. Itomic Business Website Solutions of Perth, Western Australia

Similar Threads & Tags
Similar threads

  1. List of subdomains in CSV format
    By Raoul in forum Feature Requests for cPanel/WHM
    Replies: 1
    Last Post: 08-04-2011, 08:40 AM
  2. List of subdomains in CSV format
    By Raoul in forum New User Questions
    Replies: 1
    Last Post: 08-04-2011, 08:40 AM
  3. How to download account list as csv file
    By iValueHost in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-24-2010, 11:09 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube