Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
56 user(s) are online (37 user(s) are browsing Forums)

Members: 0
Guests: 56

more...

Headlines

 
  Register To Post  

Simplemail : export address book
Not too shy to talk
Not too shy to talk


See User information
Hi All,
Simplemail is my mailer since a long time and I do all my mailings with it !
There is one thing that I can not do at the moment : exporting the address book to a csv or text file so that I could print the phone number and have it at end when the Amiga is off.

I looked at the guide and arexx interface, tried to open the file newaddressbook.xml and so far I am unable to extract the data from this file to a ready to print file.
Can someone suggest a solution ?

Another thing I was wondering : when a contact person has 2 emails address and both are written in the address book, why only the top one is used when I write a email to this contact ? How can I send a mail to both emails of the same contact ?

I look forward for the next release, probably at the end of year as it has happened in the past

Go to top
Re: Simplemail : export address book
Just popping in
Just popping in


See User information
The addressbook is a simple XML file. You can open the file with any text-editor you want.

With a little programming skills you can use XML style sheet transformation to convert the entries in any format you want.

As example: http://stackoverflow.com/questions/365312/xml-to-csv-using-xslt


Go to top
Re: Simplemail : export address book
Home away from home
Home away from home


See User information
@Gazelle
Just curious... How would you use XSLT on the Amiga? Would Odyssey be sufficient?

Author of the PortablE programming language.
Go to top
Re: Simplemail : export address book
Not too shy to talk
Not too shy to talk


See User information
Thx Gazelle for your answer but as you might guess, I am just a user with no programming skill so the solution you provide is a no-go for the average Joe user.

what about my other question regarding multiple emails adress for a single contact ?

another annoying thing is that when you sort the mails, the focus is lost (for instance if a mail fron Seb Bauer is selected and I click on FROM, all mails are listed but the selection is gone, but my idea with to see all mails from Seb Bauer).

Go to top
Re: Simplemail : export address book
Home away from home
Home away from home


See User information
@Lio Quote:
Thx Gazelle for your answer but as you might guess, I am just a user with no programming skill so the solution you provide is a no-go for the average Joe user.

That's certainly NOT what I guessed (nor I suspect Gazelle), since you mentioned "arexx interface", so it seemed somewhat likely you had some programming experience IMHO. (edit: Just for clarity, I did not think you were an *experienced* programmer! So seems Gazelle & I had the same impression.)


Edited by ChrisH on 2016/10/24 17:34:11
Author of the PortablE programming language.
Go to top
Re: Simplemail : export address book
Not too shy to talk
Not too shy to talk


See User information
well typing "rx myprg" requires no special abilities !

I tried Arexxxml from Joakim Nordström which contains some examples scripts (not for simplemail though) but sadly I am unable to find how this works !

Go to top
Re: Simplemail : export address book
Just popping in
Just popping in


See User information
@ChrisH:

There is a xslt processor on OS4Depot (never used it myself). I don't know if Odyssey (or another web-browser) would be sufficient. Btw, I did suspect Lio of being more of an user.

@Lio
AFAIK, it's not possible to traverse the addressbook with the ARexx interface of simplemail. How may entries are we talking about? Just open the adressbook in any decent texteditor and use search/replace/whatever (on a copy of course) to reformat it.

For the multiple email in the addressbook: Well, one person could have multiple email addresses and you should be able to enter them in the addressbook. Doesn't mean the person wants to get every email to all of his emails (I certainly would be very annoyed if I get the same email to all of my addresses). You'll have to enter a second/third/... recipient to the mail if you want it sent to multiple email addresses.

And for the unselecting of mails: Sorry, can't help you with that.

Go to top
Re: Simplemail : export address book
Not too shy to talk
Not too shy to talk


See User information
ok thanks ! I was lookign for something simpler because search/replace is really to much time consuming (I have several groups and more than 100 people in the addressbook).

I thought you were the current maintainer of simplemail, seems like it is not !

Go to top
Re: Simplemail : export address book
Just popping in
Just popping in


See User information
@Lio

I was an contributor to simplemail but am not anymore.

I've found a stylesheet I made a long time ago:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:output method="html" media-type="text/html" encoding="ISO-8859-1"
        omit-xml-declaration="no" />

    <xsl:template match="/">
        <html>
            <head>
                <title>Simplemail Addressbook</title>
            </head>
            <body>
                <h2>Simplemail Addressbook</h2>
                <table border="1">
                    <tr bgcolor="#9acd32">
                        <th>Alias</th>
                        <th>Name</th>
                        <th>Emails</th>
                        <th>Address (privat)</th>
                        <th>Phone (privat)</th>
                        <th>Address (work)</th>
                        <th>Phone (work)</th>
                    </tr>
                    <xsl:apply-templates />
                </table>
            </body>
        </html>
    </xsl:template>

    <xsl:template match="newaddressbook">
        <xsl:for-each select="newcontact">
            <xsl:sort select="name" />
            <tr>
                <td>
                    <xsl:value-of select="alias" />
                </td>
                <td>
                    <xsl:value-of select="name" />
                </td>
                <td>
                    <xsl:for-each select="email">
                        <xsl:value-of select="." />
                        <xsl:if test="not (position()=last())">
                            <br />
                        </xsl:if>
                    </xsl:for-each>
                </td>
                <xsl:apply-templates select="private" />
                <xsl:apply-templates select="work" />
            </tr>
        </xsl:for-each>
    </xsl:template>

    <xsl:template match="private|work">
        <td>
            <xsl:if test="count(./*) > 0">
                <xsl:value-of select="street" />
                <br />
                <xsl:value-of select="zip" />
                <xsl:text> </xsl:text>
                <xsl:value-of select="city" />
                <br />
                <xsl:value-of select="country" />
                <br />
            </xsl:if>
        </td>
        <td>
            <xsl:if test="count(./*) > 0">
                <xsl:for-each select="phone">
                    <xsl:if test="string-length(.) > 0">
                        Phone:
                        <xsl:value-of select="." />
                        <br />
                    </xsl:if>
                </xsl:for-each>
                <xsl:if test="string-length(mobil) > 0">
                    Mobile:
                    <xsl:value-of select="mobil" />
                    <br />
                </xsl:if>
                <xsl:if test="string-length(fax) > 0">
                    Fax:
                    <xsl:value-of select="fax" />
                    <br />
                </xsl:if>
            </xsl:if>
        </td>
    </xsl:template>

</xsl:stylesheet>


Save it as ".newaddressbook.xsl" at the same place where your ".newaddressbook.xml" is and add an stylesheet line to the xml file, so it starts like that:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href=".newaddressbook.xsl"?>
<newaddressbook>
...


Open the ".newaddressbook.xml" now in an browser which supports stylesheet transformation and you get a table of the addressbook or use an xslt util.

Hope that helps.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project