473,386 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Personalised e-mails with if clauses

Hello,

I am building a system to deal with inscriptions to events. There is a
backoffice which allows administrators to send emails to all or to a sub-set
of the participants. The administrators can enter the text of the emails,
using a template-like syntax to add fields from the database. For example :
"Dear {title} {first_name} {last_name}" will produce "Dear John Doe". But I
would need to add a degree in the way emails can be personalised, with if
.... elseif ... elseif ... else ... clauses.

For example :
{if (transport = 'train')}
We noted that you will come by train + instructions to come from the
train station.
{elseif (transport = 'plane')}
We noted that you will fligh to Paris + instructions to come....
{elseif (transport = 'car')}
Blablabla....
{endif}

I could use PHP syntax for the content of the mail and just eval( ) it or do
something like that, but I don't want to allow anything else than if ...
elseif ... else ... clauses. I could also use a template system (Smarty) but
for many reasons I don't use any of those anymore.

Can you give me an idea about how to do this ?
Thanks,

BLob
Dec 12 '05 #1
0 1057

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jez | last post by:
I need to be able to send individual personalised emails to contacts stored in a database. I'm able to do this using mail() and a loop, but I've read that this isn't a very good idea as there could...
5
by: Dave | last post by:
How does one go about creating personalised URLs What I want is for the user to go to www.mysite.net/johndoe where johndoe is a record in MYSQL & then generate an html page on the fly populating...
9
by: AJ | last post by:
Hi All I've got a little newsletter system that I put together for one of my customers. Basically, it's a table with firstname, lastname and e-mail address. The script then goes through the...
88
by: Tim Tyler | last post by:
PHP puts most of its functions into a big flat global namespace. That leads to short function names - but creates a namespace minefield for programmers. Lots of the functions are legacies from...
4
by: Jonah Olsson | last post by:
Dear All, I'm currently developing a solution where large amounts of personalised emails are being created (and no, this is not spam...) on the ASP.NET platform and being delivered by a Debian...
5
by: Chris Sharman | last post by:
Anyone know a good, current reference ? I found Meyer's table (now moved to http://www.ddj.com/webreview/style/css1/charts/mastergrid.shtml ) and it's 5 years since the last update. Most other...
0
by: windandwaves | last post by:
Hey Folk Does anyone know of a php class that allows you to build a personalised homepage a la Google? Is this hard to make? I know these are stupid questions, but I am completely new to...
0
by: Balaji | last post by:
Hi , I found nice free email service http://www.affiliatecurry.com/affiliate/trackingcode.php?aid=2258&linkid=T39
2
by: M | last post by:
Could anyone please help me out? I am working on a new Intranethomepage for our company, and I really, really would like to make something similar to http://www.google.nl/ig? hl=nl . There you...
0
by: sacco | last post by:
I need to develop a personalised software agent (Ebot) that will help me search the internet ( car sales websites) for vehicles being sold. I would appreciate any help
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.