Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
149 user(s) are online (79 user(s) are browsing Forums)

Members: 2
Guests: 147

Georg, cygnusEd, more...

Headlines

 
  Register To Post  

YAM addressbook
Just popping in
Just popping in


See User information
Is there way to scan whole folder and add all new senders to address book ?

It will not be complete off course but still less time consuming than add them one by one.

I just picked whole gmail to yam. Its clean from all unimportant now,so should be time to setup addressbook.

Go to top
Re: YAM addressbook
Just popping in
Just popping in


See User information
@Mlehto

Maybe you can do it with an AREXX script?

Go to top
Re: YAM addressbook
Just popping in
Just popping in


See User information
@Gazelle

I think that yes :)

Not readily available and I cant do it.

Go to top
Re: YAM addressbook
Just popping in
Just popping in


See User information
@Mlehto

Here it comes, save it under "GetAddresses.yam" int the Rexx folder of your YAM installation and call it over the script menu.

The script will add all new emails from the current folder to your addressbook but will *NOT* save it!

/* GetAddresses.yam - Insert new contacts in adressbook                                     */
/* $VER: GetAddresses.yam 1.0 (18.01.2014) (c) 2014 by Bernd Gollesch <bgollesch@speed.at>  */
/* Gets the senders of all messages in the current folder and adds them to the addressbook. */
/* Tested only with YAM 2.9                                                                 */

OPTIONS RESULTS
ADDRESS YAM

added 
0

'FolderInfo STEM folder.'                        /* get the current folder information */
DO 0 TO folder.TOTAL-1                       /* iterate throu all mails from folder */
   
DROP mess.                                    /* clear the stem for mailinfo */
   
'MailInfo 'i' STEM mess.'                     /* Get mail information */
   
PARSE VAR mess.FROM name' <'email'>'          /* separate name from email */
   
IF LENGTH(email) = 0 THEN DO                  /* no email ? */
      
IF POS('@'name) > 0 THEN DO              /* maybe the name has the email */
         
email name                            /* yup, use name as email */
      
END
   END
   
IF LENGTH(email) = 0 THEN ITERATE             /* still no email, -> no entry */
   
name STRIP(name'B''"')                  /* remove quotes from name */
   
newname name
   cpos 
POS(','name)
   IF 
cpos 0 THEN DO                           /* there is a comma in the name, reverse it */
      
newname substr(namecpos+1substr(name1cpos-1)
   
END
   newname 
SPACE(newname1)                   /* strip to one space only */
   
'AddrFind VAR dummy PATTERN "'email'" EMAILONLY'
   
IF RC 5 THEN DO                             /* email not found, add it */
      
'AddrNew VAR newalias NAME "'newname'" EMAIL "'email'"'
      
added added 1
   END
END

IF added 1 THEN
   
'Request BODY "One new addressbook entry" GADGETS "Ok"'
ELSE
   
'Request BODY "'added' new addressbook entries" GADGETS "Ok"'

EXIT


Go to top
Re: YAM addressbook
Just popping in
Just popping in


See User information
@Gazelle

You are wizard :D

Thanks !

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