|
Mike:
I have developed the beginning pieces to what you're trying to do. Instead of using RCVDST to receive e-mail, my program checks every 5 minutes to see if any e-mail has been received in the /qtcptmm/mail/USERNAME folder (replacing USERNAME with the name of the user you want to check). If so, it then uses the C api's to read in the file (which is the e-mail received, including any attachments which are embedded right within the e-mail). I'm currently not doing anything with the file, but it would be a simple matter (I think) to forward it on using the QtmmSendMail API (I also have a CMD wrapper written over the QtmmSendMail API.). If you'd like to see what I have so far, let me know. It would be a roll-your-own approach versus a purchased package which would be full featured.
Dave
-----Original Message-----
From: Mike Cunningham [mailto:MCUNNING@pct.edu]
Sent: Wednesday, January 10, 2001 1:02 PM
To: klemscot@klements.com; MIDRANGE-L@midrange.com
Subject: Re: Receiving SMTP mail using CL/RPG
I agree that Sendmail is a very good product and priced right in fact we
run a normal listserv off an RS/600 using Majordomo that users can
subscribe to and send to. My biggest reason for looking into this is to
unlock all the data stored in the AS/400 that defines the groups that
people want to send to (i.e. all students taking a class, all students
in a major, all students who are about to graduate, all employees who
are in dozens of different groups). I have looked into doing automatic
subscribes and unsubscribes from the AS/400 to Majordomo but that had
some problems also. I would prefer to not have to duplicate data into
another system as that always leads to its own set of issues.
>>> klemscot@klements.com 01/10/01 11:37AM >>>
Wouldn't this be an exit program? Seems to me that you want the
AS/400's
SMTP server to call your program when mail is received -- not the
other
way around.
Unless you're going to do this with POP3? But that seems awfully
inefficient! Polling the mail server for new messages would only add
to
the turnaround time AND it would use more resources.
I've only done stuff like this on UNIX machines (since my FreeBSD
machine
didnt cost me anything, and it works a WHOLE LOT better than an AS/400
for serving mail, I use that...) Sendmail can do distribution lists
out
of the box...
On Tue, 9 Jan 2001, Mike Cunningham wrote:
> I would like to develop an application that would would a little like
a
> listserv server and allow users to send a message to a group by
using
> the AS/400. Example: The AS/400 has all the information about which
> students are taking a class and what their email address is. I
would
> like to be able to send a message to the AS/400 with a special
keyword
> in the body of the message (like FORWARD TO CLASS CSC110 01) and the
> AS/400 would receive that message, lookup all the students in CSC110
01
> and resend the message to those students. I would do the same for
> groups of employees that are already defined in my HR database.
>
> I have the basics setup. A special AS/400 user to send the mail to.
A
> CL program that does a QRYDST to an output file, then does a RCVDST
from
> the items in the QRYDST output file to another output file and then
an
> RPG to read that file, break up the received message into it's
parts,
> scan the body for the keywords and use SNDDST (I going to convert
this
> to the EMail API) to resend the message. All this is done and
working
> as long as it is just plain text.
>
> Where this all stops working is if the incoming email has an
attachment
> (i.e. a word document) that someone wants to send to the group.
Does
> anyone have any idea how I might be able to get by this roadblock ?
> RCVDST does not appear to like attachments. Is there a receive
email
> API like the send email API ? I have not been able to find it if
there
> is
>
> Thanks for any help
>
> Mike Cunningham
> Director of Computer Services
> PA College of Technology
> mcunning@pct.edu
>
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to
MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.