Gossamer Forum
Home : Products : DBMan : Customization :

Help using an 'external' mailing list

Quote Reply
Help using an 'external' mailing list
My sites uses some mailing list software to manage our mailing list subscribers email information. This info is stored in a simple .txt file on the server.

I'd like to have the database send out an email containing some field information to each person on this mailing list when a new record is added. I know that this is possible when using some of the DBMan mailing list related mods but this relies on the email addresses being stored in the database and not in an external file.

Has anyone out there made a similar modification or can offer any advice ?
Quote Reply
Re: [gedo] Help using an 'external' mailing list In reply to
Just an idea and one I've used would be this post:

FAQ title listed under "Forms"
New page that I'll use as a "Reviewer's" form

original GT thread:

Subject: linking a new page to record
apenticoff 18-May-01
Thread: http://gossamer-threads.com/p/142235

The url may have changed but you can search by title or user.

This thread shows the setup to call formmail script to perform the function of adding fields from the database within the mailing.

I just used this to combine DBMan with a greeting card script which references the db records and then proceed to the card script.

I think you may be able to use this to call your mailing list software to provide the results you are looking for. Check it out and see.

You might also want to view the threads under the "Email" section of the FAQ as there are threads related to setting up multiple recipients and such.

Unoffical DBMan FAQ
http://redundantcartridge.com/dbman/
Quote Reply
Re: [gedo] Help using an 'external' mailing list In reply to
Thanks for the reply Lois.

I guess what I'm trying to do is slightly different but should be fairly easy to setup. I just need to add some 'email when new record is added' code, parse the mailing list .txt file for each address and then fire off an email with the required field information.

I'll post my attempt at a solution here as I guess it might be useful for other folks using external mailing list software.

Last edited by:

gedo: Sep 4, 2002, 12:54 AM
Quote Reply
Re: [gedo] Help using an 'external' mailing list In reply to
I've now got this working...It was so easy I'm now embarrased about asking for assistance !!!!! but I have encountered a fairly small but show-stopping problem.

In my code which creates the mail message I have the following line :

print MAIL "$rec{'Offer_type'} £ $rec{'Price'}\n\n";

My problem is that when the message is sent, the pound sign (£) is replaced with a question mark. I've tried replacing the £ character with the octal (\243) and hex (\xa3) values with no success. I've also tried it on it's own line incase the db field substitutions were affecting it, still no joy.

Any ideas ?????
Quote Reply
Re: [gedo] Help using an 'external' mailing list In reply to
2 options:

1. I use the following in my emails:
Code:
print MAIL "MIME-Version: 1.0\n";
print MAIL "Content-Type: text/html; charset=us-ascii\n";
print MAIL "Content-Transfer-Encoding: 7bit\n";
and then use: &#163; for the British currency symbol (actually I use &#36; for the dollar sign). Of course, that's within the <HTML></HTML> tags. But not everyone gets html encoded emails, I personally think emails should be plain text.



2. Or you could figure out what character set to use in this line:
Code:
print MAIL "Content-Type: text/html; charset=us-ascii\n";

and use the pound sign as normal, so that it doesn't get replaced with a question mark.

Good Luck! - Mike
/sbin/shutdown -h now

Last edited by:

Watts: Sep 4, 2002, 8:52 AM
Quote Reply
Re: [gedo] Help using an 'external' mailing list In reply to
But if you didn't ask for assistance then others wouldn't benefit from the responses :)

If used within the add_success screen and other subs having the price sent with the dollar sign by just using:

\$ $rec{'Cost'}

Perhaps just adding the \£ might do the trick, or use try what Watts suggested.

It would be great if you would write out your final solution for all to benefit.

Unoffical DBMan FAQ
http://redundantcartridge.com/dbman/
Quote Reply
Re: [LoisC] Help using an 'external' mailing list In reply to
Interesting.......I'd been working on this at work today and was having the £ vs ? issue with all my test emails, but when I got home (I'd also been sending them to my home account to simulate my mailing list) the £ sign is being shown correctly !! I wonder if it's a mail client related thing ??? or should that be £££

I'll try the suggestions listed above and when I crack it I'll post the 'solution' (too small the be called a 'mod') Smile