Gossamer Forum
Home : Products : DBMan : Customization :

Personalized Mass Mailer

Quote Reply
Personalized Mass Mailer
OK. I was looking at the Internal Mass Mailer and was wondering if it can be adapted to have at the beginning of the email:

Hello FirstName,

And then is it also possible to include a direct link to a specific record, where the user would be pompted to login and then taken immediatly to that record.

Thanks! Smile
Adam

Quote Reply
Re: Personalized Mass Mailer In reply to
You can do pretty much anything you want.

If you look at the code in sub mass_mail, you'll see

%rec = &array_to_hash($_, @hits);

That means that the person's entire record can be used, just like in sub html_record. The line

print MAIL $in{'emailmessage'};

prints the message that you entered into the textarea. But before and after that, you can add anything your little heart desires. Smile.

Regarding a link -- not without extra coding. You would have to add a field to the login form (and the login failure form, in case they mistyped their username or password) to hold any record data. Then you would need to add code to sub html_home so that, if there was a value in a certain variable, the script would then automatically do the search and display the record.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Personalized Mass Mailer In reply to
I got it to work doing the following:
Add this to .cfg
$db_firstname_field = 'FirstName';
Add this to db.cgi
print MAIL "Hello $rec{$db_firstname_field}\n\n";

Based on your response though, I get there is an easier way of doing this. That is, an easier way as opposed to specifying each field I want to include in the .cfg

Thanks!
Adam




Quote Reply
Re: Personalized Mass Mailer In reply to
Yes. You can just use the field names within the mass mailer.

Code:

print MAIL "Hello, $rec{'FirstName'}!
How are things in $rec{'City'} these days? I'm sure that you and the rest of the $rec{'LastName'}s are
enjoying all the things the great state of $rec{'State'} has to offer.";
JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Personalized Mass Mailer In reply to
Funny, I tried that with the first name at first and it didn't work. I think my scripts need your approval before they can actually work Smile

Thanks again!
Adam

Quote Reply
Re: Personalized Mass Mailer In reply to
Laugh It's the magic touch, I guess!

Glad you got it to work.

JPD
http://www.jpdeni.com/dbman/