[Reposted here per Justin's Request]
Hello Justin,
Sometime ago, I contacted you about possibly automating the scheduled mailing module The concept of entering each file individually into the program was quite a hassle
Anyway, I have come up with a solution I created a separate directory for all mail that I want sent via the scheduled mail module Next, I upload the files to that directory with the dates to be sent as the file name; i e , 11-01-05 txt, 11-02-05 txt, etc I can do the same for HTML based files as well
I configured the scheduled mailings module to repeat the schedule every day I also checked these boxes (assuming basic text files here):
Apply the PlainText Email template to this message Grab headers from PlainText message Only send schedule if PlainText message has data Only send schedule if PlainText message is different from last mailing Archive Mailings
Now I run my Perl script just prior to running the scheduled mail module Both are run from CRON obviously It gets a file with today's date (the date it is run on), and renames it, which effectively removes the old copy from the directory Scheduled Mail is configured to look for the renamed file each time it is run I never have to re-enter information in that program again unless I make some changes in the format The message subjects are all included I the files themselves
This is the Perl script
use warnings;
chdir("/usr/home/ges/ dada_files/ send") or die("could not change directory");
# ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = (); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($^T); $mon += 1; $year -= 100;
$fname=sprintf("%02d-%02d-%02d txt", $mon, $mday, $year);
# if (-f $fname) { printf("Renaming %s\n", $fname); rename($fname,"2bSent"); exit(0);}
$fname=sprintf("%02d-%02d-%02d htm", $mon, $mday, $year);
# if (-f $fname) { printf("Renaming %s\n", $fname); rename($fname,"2bSent"); exit(0); }
printf("File %s not found (tried both txt and htm extensions)\n", $fname); exit(0);
Anyway, it works like a charm I cannot use the 'use strict;' declaration because the program will not compile if I do I have a lot to learn about Perl yet, but I am slowly learning Actually, a friend helped me with this Actually, I would like to get it to the point where I could use the following:
use strict; use warnings; use diagnostics;
That is what Perl seems to recommend anyway
Anyway, I just wanted to see if you were interested in including something like this into the DADA program Of course you would rewrite the program so it compiled correctly with the 'use strict;' statement I would assume In any case, I just though I would throw it out there and see if you were interested
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:
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:
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.
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.