Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Multiple Advertisements - Selected at random ?

Quote Reply
Multiple Advertisements - Selected at random ?
Hello,

I have a list of around 10 advertisers whom I'd like to allow have their ads in the outgoing email from my gossamer mail system.

The only thing is it looks like I can only do one advertisement in the footer of all outgoing email.

Is there a way to setup multiple footers...and have it pick one randomly so that the ads rotate at some level?

thanks for your time.

P a i n t b a l l C i t y . c o m
http://www.paintballcity.com
Quote Reply
Re: Multiple Advertisements - Selected at random ? In reply to
Hi,

You can use globals inside of your footers, so you could add a global:

random_add =>
sub {
my $tags = shift;
my @ads = ('Ad1', 'Ad2', 'Ad3');
return $ads[rand @ads];
}

and then put <%random_add%> as the contents of the footer. That will be compltelty random, you would need to tweak the above code if you want to do anything more sophisticated.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Multiple Advertisements - Selected at random ? In reply to
Thanks Alex



P a i n t b a l l C i t y . c o m
http://www.paintballcity.com
Quote Reply
Re: [Alex] Multiple Advertisements - Selected at random ? In reply to
Hi Alex,

How to go about with following:

(1). Instead of random selection, the footer is domain specific. So for five domains there are five footer messages (using only single template).

(2). As an extension, how to have domain specific welcome emails using single template.

Actually i am wanting to move to a single template for all domains. All is done except for the above issues. Currently I am using Five Templates for Five Domains.

Thnx

Anup