Welcome, Guest. Please login or register.
Did you miss your activation email?
May 16, 2012, 09:53:56 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155094 Posts in 21661 Topics by 7721 Members
Latest Member: arrow345
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Maillist modul  (Read 6226 times)
Patrik
Guest
« on: December 20, 2004, 01:02:11 PM »

It would be nice to send a newsletter to the site members. The members e-mail adresses is in the databas already.

Mayby possibility to send to all or to just a single usergroup...
Logged
Ryan

Offline Offline

Posts: 2048



WWW
« Reply #1 on: December 21, 2004, 12:37:38 AM »

I wonder if there is anyone else with enough time that could develop such a tool? I would like to but I am too busy. Cool
Logged

Website Baker Project Founder
www.websitebaker.or g

To contact me via email, visit:
www.ryandjurovich.c om
mightofnight

Offline Offline

Posts: 153


« Reply #2 on: December 21, 2004, 12:57:09 AM »

i could possialby write a script for the codepage you could then create the page and only have it be visiable to the admins?  It sounds like somethign i could do at work Wink

i would just need help on how to access the database settings from the config file!
Logged

-Travis
Ryan

Offline Offline

Posts: 2048



WWW
« Reply #3 on: December 21, 2004, 01:02:03 AM »

Quote from: mightofnight
i could possialby write a script for the codepage you could then create the page and only have it be visiable to the admins?  It sounds like somethign i could do at work Wink

i would just need help on how to access the database settings from the config file!


Um, I am not quite sure what you mean, but I am sure it sounds like something that already exists! If you do not want people adding pages using the Code module change there group permissions, and if you dont want a specific group modifying/viewing (private page) then change their permissions in page settings. Cool
Logged

Website Baker Project Founder
www.websitebaker.or g

To contact me via email, visit:
www.ryandjurovich.c om
mightofnight

Offline Offline

Posts: 153


« Reply #4 on: December 21, 2004, 05:54:46 AM »

opps my bad i meant to use a ! not a ? sorry for the confusion.. i have been to busy lately Sad.

I will poke around with this at work tomorrow if i get time.  it's shouldn't take more then a SQL query and a very short scrip to setup a email section.  I dont' see the need for a module.  What i was tying to imply before was that someone could take this code.  Create a new page using the "code module" with admin only permissions and presta user email list.

Hay Ryan! - purhaps the websitebaker.org download section could be expanded to a section to incldue "scripts" - just a thought anyway.
Logged

-Travis
Ryan

Offline Offline

Posts: 2048



WWW
« Reply #5 on: December 21, 2004, 07:18:11 AM »

Yes that is a good idea... I will add it now! Cheesy
Logged

Website Baker Project Founder
www.websitebaker.or g

To contact me via email, visit:
www.ryandjurovich.c om
mightofnight

Offline Offline

Posts: 153


« Reply #6 on: December 27, 2004, 06:53:57 PM »

Ok i have worked out some code for a baisic email form...

create a new page using the code module with permissions for the group that you want to see and use the form.  then past this code in there! this isn't fully tested but will send an email out to all users that are in the database.  

 I wanted to use a text box for the imput form but i was having a problem where the end tage for the text box i wanted to create (even though it was escaped in ' ' was conflicting with the text box used to input stuff in the code module which caused complete chaos!



$dflt_emailaddress = ''; // This can be left blank or filled in exp 'test@test.com'
$dflt_name = '!'; // This can be left blank or filled in exp 'web master'

if ($_REQUEST['codeblock'] == false){
echo '<form method=GET action="'.$_SERVER[PHP_SELF].'">
<input type="text" name="from_address" size="20" maxlength="200" value="'.$dflt_emailaddress.'">From: email address example (email@email.com)
<br><input type="text" name="from_name"  size="20" maxlength="200" value="'.$dflt_name.'">From: email Name example (Website Greetings)
<br><input type="text" name="subject"  size="20" maxlength="200">Subject:<br><br>
Enter Message:<br><input type="text" name="text" size="80"><br>


<input type="hidden" name="codeblock" value="sendemail">
<input type="submit" value="Submit">
</form>';
}

if ($_REQUEST['codeblock'] == 'sendemail'){
      echo 'Email\'s are being sent out Please wait untill you are notified that the script is finished<br>';
      $query = "SELECT * FROM ".TABLE_PREFIX."users";
      $results = $database->query($query);
      while($setting = $results->fetchRow()) {
         $headers  = "MIME-Version: 1.0\r\n";
         $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
         
         /* additional headers */
         $headers .= "To: ".$setting['display_name']." <".$setting['email'].">\r\n";
         $headers .= "From: ".$_REQUEST['from_name']." <".$_REQUEST['from_address'].">\r\n";
         $headers .= "\r\n";
         $headers .= "\r\n";
         
         // disabled while script is finalized
          mail($_REQUEST['from_address'], $_REQUEST['subject'], $_REQUEST['text'], $headers);
      }
      echo '<br><br><br><strong>All Email\'s were sent out, it is safe to do somethign else!</strong><br>';
   }
Logged

-Travis
Ryan

Offline Offline

Posts: 2048



WWW
« Reply #7 on: December 31, 2004, 06:51:48 AM »

Thanks for the code - I will try to remember to put it on the website when I get back from vacation. Great work! Cool
Logged

Website Baker Project Founder
www.websitebaker.or g

To contact me via email, visit:
www.ryandjurovich.c om
Anonymous
Guest
« Reply #8 on: January 03, 2005, 04:14:18 PM »

opps it wont affect the running of hte code but this line can be removed

 // disabled while script is finalized

This is a old comment Smiley
Logged
mightofnight

Offline Offline

Posts: 153


« Reply #9 on: January 03, 2005, 04:17:01 PM »

opps wasn't logged in :s
Logged

-Travis
Stefan
Guest
« Reply #10 on: April 07, 2005, 11:45:35 PM »

Found this in Ideas/Feature Request Section. I'm sure it might be of use to some people so I don't want it to get lost.
Logged
maaron

Offline Offline

Posts: 11


« Reply #11 on: September 09, 2005, 07:53:33 PM »

When I go to run the script it err out this is what I have posted in the admin console... Please Help...


<input />From: email address example (email@email.com) <br /><input style="BACKGROUND-COLOR: #ffffa0" maxlength="200" name="from_name" />From: email Name example (Website Greetings) <br /><input style="BACKGROUND-COLOR: #ffffa0" maxlength="200" name="subject" />Subject:<br /><br />Enter Message:<br /><input size="80" name="text" /><br /><input type="hidden" name="codeblock" /> <input type="submit" /> </form /><php? ($_request[?codeblock?]="=" />'; $query = &quot;SELECT * FROM &quot;.TABLE_PREFIX.&quot;users&quot;; $results = $database-&gt;query($query); while($setting = $results-&gt;fetchRow()) { $headers = &quot;MIME-Version: 1.0\r\n&quot;; $headers .= &quot;Content-type: text/html; charset=iso-8859-1\r\n&quot;; /* additional headers */ $headers .= &quot;To: &quot;.$setting['display_name'].&quot; &lt;&quot;.$setting['email'].&quot;&gt;\r\n&quot;; $headers .= &quot;From: &quot;.$_REQUEST['from_name'].&quot; &lt;&quot;.$_REQUEST['from_address'].&quot;&gt;\r\n&quot;; $headers .= &quot;\r\n&quot;; $headers .= &quot;\r\n&quot;; // disabled while script is finalized mail($_REQUEST['from_address'], $_REQUEST['subject'], $_REQUEST['text'], $headers); } echo '<br /><br /><br /><strong>All Email\'s were sent out, it is safe to do somethign else!</strong><br />'; }
Logged
maaron

Offline Offline

Posts: 11


« Reply #12 on: September 09, 2005, 07:54:25 PM »

I think I'm missing <?php in some place...
Logged
maaron

Offline Offline

Posts: 11


« Reply #13 on: September 09, 2005, 08:21:21 PM »

Never Mind I go it smiley  afro
Logged
mightofnight

Offline Offline

Posts: 153


« Reply #14 on: September 09, 2005, 11:33:32 PM »

cool, so i assume that it still works Wink
Logged

-Travis
NEX2NUN

Offline Offline

Posts: 12



WWW
« Reply #15 on: November 23, 2005, 08:13:32 PM »

 shocked Rock on, this code is awesome.. just what I needed. Tweaked the form a bit. A great feature for this would be to send e-mail messages only to certain groups. Such as if you created a group that registered to your site and had no administration rights at all. I love it, great works and thanks.

Derek grin
Logged
hudge

Offline Offline

Posts: 174


WWW
« Reply #16 on: November 28, 2005, 12:42:38 AM »

I agree here is the one I have been using it is clean and simple like WB.

http://www.activecampaign.com/12all/

I would love to see at least a simple newsletter deal. Does anyone think this is doable?

Logged

: Member of the Baker's Dozen :
Baking at 350˚ for 2 hours now...
hudge

Offline Offline

Posts: 174


WWW
« Reply #17 on: November 28, 2005, 08:39:18 AM »

ok I started building the structure of a mod version of this. But I got errors Sad I cant get the data in the db. I think I have looked at it too long. I used the news mod as my template.  Please check out the mod and let me know. I have to add the snippet into it still. If you got the time feel free.

Thanks

http://www.hudge.com/contributes/newletter.zip

I think the mod should be called maillist. I just realized that. oops. :p
Logged

: Member of the Baker's Dozen :
Baking at 350˚ for 2 hours now...
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!