NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

ktl_m's avatar
ktl_m
Aspirant
Feb 23, 2012

ReadyNas photos sharing notification email not sent

Hi,
I'm running a duo on 4.1.8 release with ReadyNas add-on. Lately, neither of the album sharing notification mails are sent out - this functionality was working well up to some couple of days ago. I can see the albums under "shared albums" in readynas. Previously shared albums are accessible without issues(hence no connectivity issues)
Any hints on this?
Thank you in advance!
BR//
Catalin

6 Replies

Replies have been turned off for this discussion
  • Currently we are facing some issues with ReadyNAS Mailserver,which we are trying to fix.We will be updating you soon on this.We apologize for the inconvenience caused.

    -Minerva.
  • Firmware RAIDiator 5.3.7
    ReadyNAS Photos II 1.0.6

    Problem seems to have reappeared unfortunately. A few weeks ago it worked but yesterday it had stopped.
    Please have a look
    Janwillem
  • Hello,

    I too was annoyed with this issue. :twisted:
    There's a member - Pkas - who offered an alternative solution, independent of Netgear's service to send the e-mail invitations.
    I contacted him, it works and is simple and effective. There is now a shortcut on my desktop that will log into the NAS, start the script (select albums / people, send emails) and logout. 8)
    Many thanks to Pkas, I count now 100% on my ReadyNAS for sharing albums.

    Cheers,

    Benoit
  • Yikes - I'm trusting all my data with a company that can't even keep a mailserver up.....
  • Also very disappointed in NetGear not solving this long standing issue.

    I made a short Python script that creates a csv file with all invitations and their virtual url's.
    You can use these for re-inviting your guests through a mail from your own mail client.
    I do not see an option to attach a file so I pasted the script below. Unfortunately this in general messes up the indentation that is vital to python. You are of course welcome to ask for the proper source file but keep in mind that accessing and manipulating databases is pretty much outside my comfort zone; possibly many improvements and simplifications possible.

    Cheers, Janwillem


    # -*- coding: utf-8 -*-
    """
    Created on Tue Mar 19 16:45:23 2013

    @author: Janwillem van Dijk
    @email: jwe dot van dot dijk at xs4all point nl

    Python script to retrieve a list if invitations send by ReadyNAS Photo ii.
    The list contains the data needed to send an invitation by regular e-mail
    as a work around for the malfunctioning of the readynas mail server.
    The list is saved as a semi-colon seperated csv file.

    The user dependant data like server address, user name, password ... must be
    supplied in a json file with the following structure.
    {
    "server": "the-nas-address",
    "port": "3306",
    "user": "the-user",
    "password": "the-password",
    "readynas_name": "my-nas-name"
    }
    Advice:
    Install phpMyAdmin on the server and make a special user called python
    that only has read access.
    """

    import os
    import time
    import csv
    from operator import itemgetter
    import MySQLdb
    try:
    import simplejson as json
    except:
    import json
    import traceback


    def epoch2string(time_epoch):
    """return an ISO formatted date string from unix time stamp"""
    time_struct = time.gmtime(time_epoch)
    return time.strftime('%Y-%m-%d %H:%M:%S', time_struct)


    def rows_to_dict(rows, fields):
    """convert a table from list to dict"""
    table = {}
    for row in rows:
    d = {}
    for i, field in enumerate(fields):
    d[field['name']] = row
    table[row[0]] = d
    return table


    def table_to_dict(cursor, table):
    """
    read the data from a MySQL table and return as a Python dictionary
    """
    sql = 'show columns FROM %s' % table
    try:
    # Execute the SQL command
    cursor.execute(sql)
    # Fetch all the rows in a list of lists.
    columns = cursor.fetchall()
    fields = []
    for c in columns:
    fields.append({'name': c[0], 'type': c[1]})
    except:
    print 'Error: unable to fecth columns from %s' % table
    traceback.print_exc()

    sql = 'SELECT * FROM %s' % table
    try:
    # Execute the SQL command
    cursor.execute(sql)
    # Fetch all the rows in a list of lists.
    rows = cursor.fetchall()
    data = rows_to_dict(rows, fields)
    except:
    print 'Error: unable to fecth data from %s' % table
    traceback.print_exc()
    return data, fields


    def table_to_list(cursor, table, where=None):
    """
    read the data from a MySQL table and return as a Python list
    """
    sql = 'show columns FROM %s' % table
    try:
    # Execute the SQL command
    cursor.execute(sql)
    # Fetch all the rows in a list of lists.
    columns = cursor.fetchall()
    fields = []
    for c in columns:
    fields.append({'name': c[0], 'type': c[1]})
    except:
    print 'Error: unable to fecth columns from %s' % table
    traceback.print_exc()

    sql = 'SELECT * FROM %s ' % table
    if where:
    sql += ' WHERE ' + where
    try:
    # Execute the SQL command
    cursor.execute(sql)
    # Fetch all the rows in a list of lists.
    rows = list(cursor.fetchall())
    rows.sort()
    except:
    print 'Error: unable to fecth data from %s' % table
    traceback.print_exc()
    return rows, fields

    if __name__ == '__main__':
    """read credentials from file stored in HOME directory
    """
    credentials = '.rnp_credentials.json'

    home = os.getenv("HOME")
    credentials = os.path.join(home, credentials)
    rnp2dict = json.loads(open(credentials).read())

    """
    Open database connection with rpn2 database"""
    rnp2 = MySQLdb.connect(host=rnp2dict['server'],
    port=int(rnp2dict['port']),
    user=rnp2dict['user'],
    passwd=rnp2dict['password'],
    db='rnp2')
    cursor = rnp2.cursor()

    albums, album_fields = table_to_dict(cursor, 'album')
    invited_users, invited_fields = table_to_list(cursor, 'invited_user',
    where='taxonomy LIKE "album"')
    rnp2.close()

    #convert invitations to a nested dictionary for easy lookup
    invitations = {}
    for invu in invited_users:
    if invu[0] not in invitations:
    invitations[invu[0]] = {}
    invitations[invu[0]][invu[1]] = \
    {'last_date': epoch2string(invu[3])}
    """
    Open database connection with rpn2user database"""
    rnp2user = MySQLdb.connect(rnp2dict['server'], rnp2dict['user'],
    rnp2dict['password'], 'rnp2user')

    cursor = rnp2user.cursor()

    users, user_fields = table_to_dict(cursor, 'user')
    virtualurls, virtualurl_fields = table_to_dict(cursor, 'virtualurl')
    rnp2user.close()

    """
    make a lsit of all invitations and save as csv
    """
    vurl_base = 'http://photos.readynas.com/%s/?v=' % rnp2dict['readynas_url']
    invitation_list = []
    for virtual_url in virtualurls:
    vurl = virtualurls[virtual_url]
    guest_id = int(vurl['user_id'])
    real_url = vurl['real_url']
    album_id = int(real_url.split('=')[-1])
    try:
    guest_first = users[guest_id]['firstname']
    guest_last = users[guest_id]['lastname']
    guest_email = users[guest_id]['email']
    except:
    guest_first = ''
    guest_last = ''
    guest_email = ''

    album_name = albums[album_id]['title_sort']
    if album_name == '':
    album_name = albums[album_id]['title']
    try:
    last_date = invitations[guest_id][album_id]['last_date']
    except:
    print guest_id, album_id
    print invitations[guest_id]
    last_date = ''
    invitation_list.append([guest_first, guest_email,
    album_name, vurl_base + virtual_url, last_date])
    """Sort on guest_first i=0 and for album_name i=2"""
    i = 0
    invitation_list.sort(key=itemgetter(i))
    invitation_list.insert(0, ['guest_first', 'guest_email',
    'album_name', 'virtual_URL', 'last_invitation'])
    print '%d invitations listed' % len(invitation_list)

    f = open('invitation_list.csv', 'w')
    fcsv = csv.writer(f, delimiter=';', quotechar='"')
    for row in invitation_list:
    fcsv.writerow(row)
    f.close()

    print 'Finished'

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More