Help - Search - Members - Calendar
Full Version: Email Notifications
Movable Type Community Forum > Additional Resources > Tips and Tricks
AMK4
Rather than typing in a couple of hundred emails, is there some way to have MT read in a file, maybe CSV file and import the addresses? If not I suppose I can go to my shell and do a mysqlimport and get the data up that way, but it seems to me this is one thing MT should have.
kadyellebee
I think I typed mine in when I started out. If you have PHPMyAdmin, it probably wouldn't be too hard to put the information into a INSERT format - when I export my databases, the Notification table has lines that look like this:
CODE
INSERT INTO mt_notification VALUES (117, 4, NULL, 'user@yourdomain.com', NULL, '2002-05-01 14:44:10', 20020626203431, NULL, NULL);

I believe that the 117 is just whatever the next number is when being imported, which you can generate with just quotes. 4 is the blog ID that you are wanting the notifications sent via. And the date/time stamp may not be important to you, so if you leave them blank, they'll just default to 000000 strings.
CODE
INSERT  INTO mt_notification VALUES ('', 4,  NULL ,  'user@yourdomain.com',  NULL, '', '', NULL, NULL)


So if you take your email list and find/replace the stuff before the email address for all lines, and then find/replace the stuff after the email address for all lines, you would be set to enter that as a SQL query in PHPMyAdmin.

If any of this isn't clear, let me know and I'll try some more smile.gif

Kristine
AMK4
Nah, I know MySQL inside and out, that part I can do just fine. That 117 is an auto_increment field, so you can feed it NULL (in fact, that's the default.) The _modified_on is a timestamp which gets filled in automatically. Most of the fields are NULL with the exception of the _created_on and _blog_id. Since I already have my emails in an Access database, which is already linked to my MySQL server, all I have to do is push the data out. I just thought maybe MT has something that allows for CSV imports (since I'm sure not everyone has a setup like me. tongue.gif )
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.