Gossamer Forum
Home : Products : DBMan : Customization :

Private mailer question

Quote Reply
Private mailer question
I am using the private mailer mod - and where it asks the sender to enter their email address - I want it to dynamically pull their email address from the database and auto-fill it in - it should be able to do this since they have to login in order to view the profiles anyway, correct?

Any ideas?

Donm

Last edited by:

donm: Mar 31, 2004, 1:02 PM
Quote Reply
Re: [donm] Private mailer question In reply to
There are probably several ways of accomplishing this.

Here is one thread reference taken from the FAQ noted below under the topic "Email" which might help. If not, I'm sure you can find other variations by viewing the threads in the FAQ.

Thread reference:
http://gossamer-threads.com/scripts/forum/resources/Forum12/HTML/002703.html
Topic: Name in email
johnsonny - posted April 20, 2000

If the url above is no longer correct search the forum by topic or the user who posted.

Another reference:

Email field as FROM entry of the e-mail

In my config file I have got a field called "Email" that must be filled out. Is there a way to show the content of the "Email" field in the FROM entry?

The "Email" field is in position 4.

Response by JPDeni:

Use: print MAIL "From: $in{$db_cols[4]}\n";

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Private mailer question In reply to
I think I found the same post Lois did... the ones I saw also mentioned having the users email address stored in the db.pass file. This way dbman would know how to associate an email adress with a particular user (unless you are using the relational mod or something).

Also check out the FAQ linked in Lois's signature (redundantcartridge.com/dbman) and look under "emails". I saw some mods/hacks in there relating to the private message mod, but I didn't read all of them - although none of them 'jumped right out at me'.

I thought this sounded familiar...
http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=256119;search_string=.pass;#256119

There's gotta be a way... I'll be more than happy to hack around with it next week if you want me to. This week has been kinda crazy for me at work (in a good way).

Last edited by:

Watts: Mar 31, 2004, 3:54 PM
Quote Reply
Re: [Watts] Private mailer question In reply to
Don - are you using a relational mod to store the users 'profiles' ? If so, it'll be real easy to grab the email address.
Quote Reply
Re: [Watts] Private mailer question In reply to
I tried everything that was in the messages that you referenced in your posts - nothing seems to work?

Donm
Quote Reply
Re: [donm] Private mailer question In reply to
How are you storing the email addresses? In other words how will dbman know that User: Bob has an email address of bob@domain.com when he logs in and visits User Joe's record and wants to send him an email?
Quote Reply
Re: [Watts] Private mailer question In reply to
Ok I have figured out that by using %rec = &get_record($in{$db_key}); and then using $rec{'EmailAddress'} , I get the correct address that I am sending to.

And when I try $db_userid is the db_userid - the correct userid prints out for the logged in user (sender).

I want to pull the email address for the logged in user ($db_userid). The email address is stored in a MySQL database in a table called $db_table_user

donm
Quote Reply
Re: [donm] Private mailer question In reply to
Ah... Sorry, I don't know beans about SQL. Unsure

Rats. Wish I could help.

If you haven't already done so, try posting the whole scenario in the dbman SQL forum and they may be able to help you with getting the item you need out of the table and into the flat file version of dbman.

Good Luck!