Gossamer Forum
Home : Products : DBMan : Customization :

How to substitute UserID with eMail address?

Quote Reply
How to substitute UserID with eMail address?
Hi all...

I'm an absolute beginner to Perl & DBMan, but so far I could install it, set up a DVD database for personal exchange.
Now I have the following prob:
All of the folks involved so far had UserIDs that are the same as their eMail addresses.... e.g. UserName@aol.com...
(without the "@aol.com" of course)

So when the search result for a DVD is displayed in "sub html_record" (in the 'html.pl' file) I let DBMan read the UserID and add the domain "@aol.com":
"<a href="mailto:$rec{'Userid'}\@aol.com?subject=DVD Database: $rec{'Title'}&body=Hello,
I want the following DVD $rec{'Type'} br><b>$rec{'Title'}</b>">$rec{'Userid'}</a>

This opens - due to the hyperlink - a new eMail to an AOL account.

Worked fine so far...

The problem now is that some people joining the database don't have email addresses like this, so I have to "substitute" the userID with a variable or whatever.
The UserID - i.e. the owner of the DVD, the one to whom the email should be sent - is listed in the default.pass file.

How can I set/transform/combine "Userid ==> eMail Address"???

Thanks in advance for any good ideas :-)

BTW: The eMail adresses are *NOT* added, when creating a new account, but it's ok for me to add them manually.

Or is there even a way to add them to the userlist, when creating a new account?