D3Linux 7.4.0 running on RedHat 9.
Thanks.
--
Ricky Ginsburg
Have you seen Ricky's new website?
http://www.fawnridge.com/ricky
Search the group for "SMTPSEND"
This is a fully Pick based little email program that my boss found and
I tweaked for our purposes.
With a little thought, (I had some at one point) I was able to send
mail with an HTML attachment. I had to do some research on how to
make a mail message see an attachment. In the end it wasn't hard.
The toughest part for me was finding the information.
Other methods is to write the file from Pick into a known file on the
Linux side and then use Linux's metasend.
A caveat here!!! With the latest licensing scheme from RD/TD or
whatever they are calling themselves, the first option will consume a
licensed seat when sending the mail.
hth
Dale
GlenB
<dbene...@gmail.com> wrote in message
news:f64625a8-a35d-4bcc...@o40g2000prn.googlegroups.com...
--
Ricky Ginsburg
Have you seen Ricky's new website?
http://www.fawnridge.com/ricky
"GlenB" <batchelg...@bellsouth.net> wrote in message
news:2M1nk.7570$De7....@bignews7.bellsouth.net...
Thanks.
--
Ricky Ginsburg
Have you seen Ricky's new website?
http://www.fawnridge.com/ricky
"Rookie" <goo...@caspersonline.us> wrote in message
news:ce212904-f58f-4061...@c65g2000hsa.googlegroups.com...
--
Ricky Ginsburg
Have you seen Ricky's new website?
http://www.fawnridge.com/ricky
"Art" <artm...@triad.rr.com> wrote in message
news:5dd1f6d1-b4f7-4d15...@z72g2000hsb.googlegroups.com...
I will forward a routine I have used in D3 for a long time to send
using sendmail (rather than mutt). I am not sure it is original by
me, or I would publish it here.
It handles both plain-text and html with/without attachments. (using
the linux mpack command for attachments)
HTH,
Robert
On Aug 11, 10:38 am, "Ricky Ginsburg" <ric...@fawnridge.com> wrote:
> Art - I've got that figured out. My problem is getting it to work.
> Apparently there's a problem with sendmail.mc where it's not finding a path
> to send e-mail to my ISP.
>
> --
> Ricky Ginsburg
>
> Have you seen Ricky's new website?http://www.fawnridge.com/ricky"Art" <artma...@triad.rr.com> wrote in message
--
Ricky Ginsburg
Have you seen Ricky's new website?
http://www.fawnridge.com/ricky
"uiterwyk" <rob...@uiterwyk.net> wrote in message
news:8ee2b8b5-9d8e-4bb1...@c58g2000hsc.googlegroups.com...
Like this?:
removepleaseNebula-RnD.com/products/mail.htm
Nah! Impossible! ;)
FWIW, the reason I wrote NebulaMail is _exactly_ because of this
situation. The Pick developer writes code and it works great for now.
Then the user asks for HTML, then for embedded images, then for
attachments, then for custom headers... If you don't want to develop
and then re-develop, ask me about NebulaMail.
Another thing to consider is that not all email clients accept email
the same way. After sending HTML emails many people decide they want
to embed images rather than linking to them. And some email clients
accept both HTML and text in the same package so that the client
software can read it regardless of how it was sent. If the email
isn't properly crafted the recipient gets the format they want but
then it looks like they have an attachment too, which is just the same
email in the other format. And yup, NebulaMail handles all of this
for you.
Now after all of that... As time permits I'm re-writing the
underpinnings of NebulaMail to include all of the features of
NebulaShip:
removepleaseNebula-RnD.com/products/ship.htm
The advantage is that a lot more features become available, including
many features unique to email clients vs sending agents like sendmail.
The difference (not a disadvantage, just different) is that NebulaMail
will now work like everything else from Nebula R&D, with the MV DBMS
sending data to a Windows middle-tier which then does all of the heavy
lifting.
Why make that shift? Well, many of you have or are going through this
now. Having ported products to SCO, Linux, AIX, HPUX, and other
platforms I've learned that hard-coding to a single platform for
immediate convenience does not translate to long-term convenience when
sites start to migrate. With NebulaMail and other offerings, the MV
software and all related BASIC code works exactly the same no matter
which DBMS or OS platform it's all running on.
HTH
T
Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Ricky,
Just picking up on this point, I'm curious - are you using some form
of "telnet" client/TE on the Mac's? Assuming that the Mac's are
"recent", and your TE allows you to execute an OS X command, what is
wrong with using the in-built (to OS X) "mail" program --> should be a
fairly minimal change to your code from what I understand ?!!
Ricky,
Ross - I asked the System Admin if he knew of any Mac programs that we could
run in place of Blat and he didn't have a clue. I'll pass this along to him.
But the real question is - How do you execute a Mac program from D3Linux?
From a linux point of view it is very easy to send out an email message,
there are a couple of options depending on what type of msgs want to be sent
out
1) Write out a txt file into a /tmp directory in the Linux Filesystem and
then execute the linux mail command
2) Same as step 1 but you can pipe it through sendmail which would allow you
to control what email address the msg is going to from within Pick
There are other commercial alternatives out there, but the above two would
cater for most situations. There are obviously the exceptions like if you
want to uuencode or send massive attachments then you need to look at a more
robust commercial solution.
Andrew
"Ross Ferris" <ro...@stamina.com.au> wrote in message
news:9e9d0c8f-afbf-4073...@l33g2000pri.googlegroups.com...
"Ricky Ginsburg" <ric...@fawnridge.com> wrote in message
news:g7hl2q$74v$1...@aioe.org...
Small, identical client/server components on both sides, written in
Mono (my preference) or Java. Example:
EXECUTE "!msg2remote machost execute thiscmd param1 param2..."
I have a supply of solutions - just waiting for a supply of demand. ;)
--
Ricky Ginsburg
Have you seen Ricky's new website?
http://www.fawnridge.com/ricky
"Tony Gravagno" <address.i...@removethis.com.invalid> wrote in
message news:dihja496caelv05qh...@4ax.com...
This has to be one the most asked questions on cdp. I googled "send
email from pick" in cdp and got 299 results.
Peter is right- Postie is the easiest and simplest way to do this. It
works with smtp servers, pop & imap accounts, handles attachments, and
can send and receive. You can download versions for windows/unix/
linux to try for free, but I hope you'll end up sending Andrew the $50
he deserves. Postie is flexible, cheap, bulletproof, and installed at
every site I administer.
/Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006
And a hurricane-less tropical season each year...
GlenB
#!/usr/bin/perl -w
use strict;
use MIME::Lite;
use Getopt::Std;
#------------------------------
# main
#------------------------------
sub main {
my %opts;
### Get options:
getopts('', \%opts) or die "usage error\n";
my $addr = $ARGV[0] || die "Missing email address.\n";
my $fpath = $ARGV[1] || die "Missing filename to attach.\n";
my $subj = $ARGV[2] || die "Missing Subject.\n";
my $msg = MIME::Lite->new(From => 'mai...@plygempw.com',
To => $addr,
Subject => $subj,
Type => "multipart/mixed");
$msg->attach(Type => "text/csv",
Path => $fpath,
Disposition => "attachment");
MIME::Lite->send("smtp","<your.mail.server>", Timeout=>60);
$msg->send;
}
exit(&main ? 0 : -1);
1;
__END__
This requires MIME::Lite and you can get that via CPAN. To send
other attachment types, just change the "text/csv" to whatever you need.
For example, PDF files would use "application/pdf".
I call this script via rule module in D3. A simple EXECUTE and it's done.
g.
The next step with the Perl code that Gene provided is:
My customers want this on their Windows system.
Great, go to ActiveState, get Perl for Windows, and install it on
every client system. Then configure CPAN to auto-download the various
required modules.
The next step is:
Sometimes we want CSV and other times PDF or XLS or...
Great, dynamically generate the Perl code from BASIC.
The next step is:
Our clients' SMTP servers require user/login.
Great, add parameter handling to the Perl code to accept a userID and
password.
The next step is:
Everything stopped. What happened?
Great, add error handline with "die" statements that return an error
message back to BASIC to let the application know what happened.
Usually the problem is that someone changed SMTP settings.
The next step is:
Can we BCC ourselves to make sure it's working?
Sure, add more arguments to the MIME:Lite constructor.
As you can see this can go on for a very long time. NebulaMail was
created to keep the MV developer in BASIC and out of Perl, allow all
the features without having to recode to support every new request,
and most of all to be completely platform independent.
Again, this is honestly not intended to be a sales presentation but a
notice to anyone doing this sort of work that the very first step (as
shown in Gene's excellent code) makes a production solution look
deceptively simple in the beginning. That's why I've taken the time to
create solutions that actually do keep it simple for the first
customer through the last, and the first installation through the
last.
HTH
T
Here's another bit for the *nix geeks in the audience:
#!/bin/bash
case "$4" in
txt)
/usr/local/bin/mail_csv $1 $2 $3
;;
pdf)
/usr/local/bin/enscript -e -Z -B --non-printable-format=space -h -H --highlight-bar-gray=.80 --landscape -j --font=Courier-Bold8.5 --ps-level=1 $2 > $2.ps 2>/tmp/enscript.errors
/usr/bin/ps2pdf $2.ps $2.pdf 2>/tmp/ps2pdf.errors
/usr/local/bin/mail_pdf $1 $2.pdf $3
;;
esac
The enscript command line is pretty long, so it may or may not get cut off
by your newsreader software.
If you want to create a simple way to spool output directly to a hard
coded email address, you can set up a special printer entry:
STARTSHP <ptr#>,<ptr#>,0,S<port>,LP.UNIX,(/usr/local/bin/print_pdf)
print_pdf looks like this:
/usr/local/bin/enscript -e -Z -B --non-printable-format=questionmark -h -H --font=Courier-Bold7.5 --ps-level=1 --media=PDFLetter > /tmp/print_pdf.ps
/usr/bin/ps2pdf /tmp/print_pdf.ps /tmp/print_pdf.pdf
/usr/local/bin/mail_pdf <your_email_address> /tmp/print_pdf.pdf Printed_PDF_Report
This basically emails you a PDF file that has the D3 printer job in it.
Note that unless you've got the form set up to handle the number of lines that
the PDF file has per page (84 lines or so if memory serves), your pagination
is going to be all screwed up. However, for a quick & dirty output check
it beats the hell out of wasting paper when you're developing a complex report.
g.