Gossamer Forum
Home : Products : DBMan : Customization :

Web Mailer questions

Quote Reply
Web Mailer questions
I have v2.1 mod up and running, but I am not sure I have everything set up correctly.
When my users add records to the database, they have to input their email address as one of the fields. So, if they add 50 records, they put their email address in 50 different times and thus they get 50 different emails from the mod. Surely, it was not meant to be this way.
As I have it set up right now, the email address gets stored in the default.db file along with every record. Is this wrong?
If this is the way it was meant to be, how can I go about mass mailing just the users in my password.pass file and not the default.db file? This way, everyone that gets a username and password gets the email and not just the people that actually has records posted in the database.
I already have an email address for each user in the password.pass file from the "Secure Password Lookup" mod. Can I use that field for the mass mailer?
Quote Reply
Re: Web Mailer questions In reply to
Look in the Secure Password Mod...Do you see the codes for &get_email. You can automatically put the email address from the .pass file into the add form via the sub html_record_form. READ the Secure Password Mod carefully!

The only thing that has not been tested with this upgraded script is mutiple email addresses. Code hacks may have to be added to eliminate sending duplicate email messages to users.

If duplicate messages are sent out...you can always use the default.pass file, which should only contain ONE email address per user account...I posted codes for using the default.pass with this Mod about a month ago...Search the forum!

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums


[This message has been edited by AnthroRules (edited March 03, 2000).]
Quote Reply
Re: Web Mailer questions In reply to
Well, what you can do is add the permission setting to the default.pass upon setting up their account, and then add some subs in the html.pl and db.cgi to allow people to change their account information in the default.pass.

Another suggestion is to open the main database file and check for permission field, which would not be very effective in terms of CPU usage.

These solutions would be tedious to do and I do not have time to do them right now. Sorry.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Web Mailer questions In reply to
Eliot,
Thanks, I found the message that you posted 3 months ago about using the default.pass file for your emails. This is exactly what I want to do.
http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/001448.html

I now get a message saying "No Email Address Field defined"
Here is the coding from my default.pass file:

# UserID : Password : View : Add : Del : Mod: Admin : Email address
Shane:password:1:1:1:1:0:shane@web-dreamz.com

You said the mailfield should be this:
$mailfield = 7;
Should I have it set to 7 or 8. Not sure if the counting starts with 0 or 1...

Also, you said for the user field variable put this:
$userfield = 1;
I cant seem to find this userfield variable in any of my files.

How do I set up the confirm field (yes/no)?
$confirmfield = 7;
Do I need to make it to where when the user signs up for an account they decide whether to receive email updates at that point and store the yes/no confirmation in the default.pass file?

Thanks alot!
Shane




Quote Reply
Re: Web Mailer questions In reply to
I belive userfield is referring to auth_user_field in default.cfg:

# Auth user field. This is the field position in the database used for storing
# the userid who owns the record. Set to -1 if not used.
$auth_user_field = 0;

(It is field "0" in my database)

$mailfield = 7; should be correct.

For the $confirmfield, the only way I know of to mail from the .pass file without extensive modification of db.cgi is to drop $confirmfield (comment it out with a # in front of the line) and send mail to everyone with a userid.

Dan
Quote Reply
Re: Web Mailer questions In reply to
Great, got it working. But, now the user doesn't get the option to allow or disallow emails. Oh well, no biggie.

In webmailer.cgi, I had to change the following:

@data = split /:/, $line;
if (($data[$mailfield]) and ($data[$confirmfield] eq 'Yes')) {
push (@emails,$data[$mailfield]);
push (@confirm,$data[$confirmfield]);
}
}

to:

@data = split /:/, $line;
if ($data[$mailfield]) {
push (@emails,$data[$mailfield]);
# push (@confirm,$data[$confirmfield]);
}
}

Thanks Dan and Eliot!
Shane