[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - Address book and tags

Address book and tags

Help and advice on using PocoMail

Moderators: Eric, Tomas, robin

Address book and tags

Postby paolo » Mon Aug 02, 2004 1:49 am

Good morning

I would like to personalize mails I send to a group of person with their names and other details

I have all of them registered in my address book and I would like to create a template that use the right name for the right address

Something very easy for ex. if Mr. Paolo Napoleoni
has this address pn@hotmail.com
I would like to create a tempalte that automatically makes:

to : pn@hotmail.com

Good morning Mr. Napoleoni, ....

Where and how I have to use the address book ?

Thanks
Paolo
paolo napoleoni
paolo
Poco Tourist
 
Posts: 19
Joined: Sun Jul 25, 2004 11:44 pm
Location: Rome - Italy

Postby frazmi » Mon Aug 09, 2004 8:29 pm

This is both easy and difficult. It's easy to use templates to insert address book data into an email, but difficult to make it "intelligent" and difficult to make it seamless. However, the following may be of service...

1) Check out the Poco Help under Templates. There's a lot of information there. You have to dig a little, however.

2) To insert data from the address book in the body of the message, you have to know the "tag" of the data. For last name, the tag is "Last" -- so the line of a template that inserts the title and last name of a person based on the To: field is...
Code: Select all
Dear %to_field%:"Title" %to_field%:"Last" ,


The problem with this approach is that you must select the addressee before you invoke the template. For new messages, the only practical way I've found is to compose a new message directly from the Address Book (right click on a name, new message).

If you start a new message any other way, the To header is blank, and the template has nothing to operate on. In this case, you can apply the template as a separate operation, by using the Format | Open Template option. But that's fairly cumbersome.

Note that you can assign a template to use for new messages, replies, forward and bounce using the Account Setup dialog.

You probably could write a script to do a better job of all of this, but I think it would be non-trivial. (More than 20 lines of code, anyway.)
frazmi
Poco Enthusiast
 
Posts: 248
Joined: Tue Jul 27, 2004 1:27 am
Location: South Korea

Postby Michael » Tue Aug 10, 2004 3:52 pm

You can also assign templates to individual names in your address book. Open the address entry for an individual and go to the "Templates" page.

You cannot code the template to be smart enough to know whether you are writing in the morning, afternoon or evening, you would need a script to do that. If you go this route you would want to look at either the OnCompose or OnComposeEdit events to trigger the script.

Scripting will be more work than a template but scripts provide you the ability to do far more than a template can. For instance you can examine the various fields in the address book and make intelligent decisions as to what you want to do. You can even check which address book the entry is from and customize your actions based on this. Another possibility is that you can search the custom fields and use them. This would not be trivial (much more than 20 lines of code).
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada


Return to PocoMail Help and How-To

Who is online

Users browsing this forum: No registered users and 3 guests

cron