Re: new extension: send_dada_mail.pl, new docs: moving towards multiple fields

 
From: "Frans Gouverne" <f.gouverne@PROTECTED>
Date: April 30th 2007

Hi Justin,

I guess I can use send_dada_mail pl also to send a web page from a Perl script? Because many of my customers are using Dada to send a newsletter This newsletter is a HTML page which they can modify with a CMS system Something like:

use MIME::Lite::HTML; my $mailHTML = new MIME::Lite::HTML IncludeType => 'cid', From => "$in{'from'}", To => "$in{'to'}", Subject => "$in{'subject'}", my $HTMLContent = $mailHTML->parse($url);

open( DADA, "|/home/youraccount/cgi-bin/dada/extensions/ send_dada_mail pl --list mylist") or die $!; print DADA $HTMLContent ; close DADA or die $!;

Currently I let the customer automatically login to the send_url_email (Send a web page) screen from the CMS in a new window:

/cgi-bin/dada/mail cgi?f=login&admin_password='+password+'&auth_state=1&admin_list='+mylist+'&admin_option1=f=send_url_email&admin_option2=url='+newsletter_url;

I changed a few lines of code in sub "login" from mail cgi to pass options admin_option1 admin_option2 to the send_url_email URL which makes it possible to pass the url from the newsletter to the send_url_email screen And a few changes in sub "send_url_email" and the corresponding template of course

The result of this is: from the CMS you only need to fill in the dada password A new window is opening with Dada's "Send a web page" screen and the url of the newsletter is already filled in for you You only need to press the "Submit mailing list Message" button and that's it Because you are really logged in to the admin panel now, you can also Monitor your mailing right away

I guess you can do more interesting things when using a CMS and Dada together So my suggestion is to modify the login sub from mail cgi in such a way (as I already did) to make it possible to go to a specific admin screen and also passing some fields for this specific screen already

The extra code I am using in login: $referer = "$DADA::Config::S_PROGRAM_URL?" $q->param('admin_option1') if($q->param('admin_option1')); $referer = '&' $q->param('admin_option2') if($q->param('admin_option2')); $referer = '&' $q->param('admin_option3') if($q->param('admin_option3'));

just before the existing lines:

        print $q->header(-cookie  => [$dumb_cookie, $login_cookie],
                          -nph     => $DADA::Config::NPH,
                          -Refresh =>'0; URL=' 
 $referer);

Regards,

Frans

----- Original Message ----- From: "Dada Mail (Justin Simoni)" dada@skazat com To: dadadev@PROTECTED Sent: Tuesday, April 24, 2007 6:50 AM Subject: [dadadev] new extension: send_dada_mail pl, new docs: moving towards multiple fields

>

Hey everyone -

two points:

I just completed the rough rough rough draft of a new extension, called, send_dada_mail pl, which is a small command line utility that will allow you to send a message to all your subscribers of a given list It works much like the sendmail command (and with a slight massage) - you could even replace the calling of the sendmail command with this little script, if you were devilish to - for example, say you have a form to email script Instead of sending the results to one person, you can now send them to an entire list of people and also save the info in Dada Mail's archive Or something

In a more less ridiculous example, say you have a Content Management System, that you'd like to hook up to Dada Mail so that it sends a message to a particular list, every time you update a section of your website -

On the command line, you'd type something like this:

prompt:]
/send_dada_mail
pl --list mylist
Subject: This is my subject!

This is my message!

-- Justin

^D

This should make it pretty insanely easy for local applications to send a Dada Mail message out In perl, this all would look like this:

!/usr/bin/perl

open( DADA, "|/home/youraccount/cgi-bin/dada/extensions/ send_dada_mail pl --list mylist") or die $!; print DADA "Subject: This is my subject!\n\n"; print DADA "This is my message!\n\n"; print DADA "-- Justin"; close DADA or die $!;

And the script now is like 150 lines, so nothing new happening, just reusing things

Second note, I've started typing out exactly how the multiple fields project is going to happen Things are fairly nebulous at the moment, but they're get more and more refined over time and then that'll be the start of the actual program files, scripts and modules

Both these will be released officially when the next version of 2 11 in the alpha series is also released That is most likely going to happen when 2 10 14 goes gold

So, interesting things coming up in the pipeline,

Any questions?

-- Justin Simoni

Dada Mail - Write Once: Distribute Everywhere Software url: http://mojo skazat com

--

Post: dadadev@PROTECTED

Unsubscribe: http://mojo skazat com/cgi-bin/dada/mail cgi/u/dadadev/

List Information: http://mojo skazat com/cgi-bin/dada/mail cgi/list/dadadev

Archive: http://mojo skazat com/cgi-bin/dada/mail cgi/archive/dadadev

  • This mailing list is a public mailing list - anyone may join or leave, at any time.
  • This mailing list is a group discussion list (unmoderated)
  • Start a new thread, email: dadadev@dadamailproject.com

This is the developer discussion mailing list for Dada Mail.

If you are just looking for support Dada Mail, consult the message boards at:

https://forum.dadamailproject.com

Documentation for Dada Mail:

https://dadamailproject.com/d

Specifically, see the Error FAQ:

https://dadamailproject.com/d/FAQ-errors.pod.html

To post to this list, send a message to:

mailto:dadadev@dadamailproject.com

All subscribers of this list may post to the list itself.

Topics that are welcome:

  • Constructive critiques on the program (I like, "x", but, "y" needs some work - here's an idea on how to make this better...)
  • Bug/Error reports
  • Bug fixes
  • Request For Comments on any changes to the program
  • Help customizing Dada Mail for your own needs
  • Patches
  • Language Translations
  • Support Documentation/Doc editing, FAQ's, etc.
  • Discussion of any changes that you would like to be committed to the next version of Dada Mail -

Dada Mail is on Github:

https://github.com/justingit/dada-mail/

If you would like to fork, branch, send over PRs, open up issues, etc.

Privacy Policy:

This Privacy Policy is for this mailing list, and this mailing list only.

Email addresses collection through this mailing list are used explicitly to work within this email discussion list.

We only collect email addresses through our Closed-Loop Opt-In system.

We don't use your email address for any other purpose.

We won't be sharing your email address with any other entity.

Unsubscription can be done at any time. Please contact us at: justin@dadamailproject.com for any help regarding your subscription, including removal from the mailing list.

All mailing list messages sent from us will include a subscription removal link, which will allow you to remove yourself from this mailing list automatically, and permanently.

All consent to use your email address for any other purpose stated at the time of the mailing list subscription will also be revoked upon mailing list removal.