Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Electronic remittance advice 1

Status
Not open for further replies.

Calator

Programmer
Feb 12, 2001
262
AU
Our Accounts /Payable users in MIMS 4.1 are implementing EFT Payments to suppliers using MSB284.
They require electronic Remittance Advice to be sent to supplier as part of their new procedure.

Do you have any experience in this area and could you supply any general advice/solution/idea?

We are considering writing an RDL that reads MSI284A and generates emailed remittance advices by using the NOTIFY command together with supplier's email address or supplier
number in MIMS.

Do you have any detailed doco on the NOTIFY command of RDL and in particular:

1 "Recipient type": what are the possible codes
apart from 'E'? is there a code for "supplier",
which then accepts a supplier number in the
associated "recipient" keyword?

1 "Address": can we specify the destination
by supplying an actual email address using this key,
rather than the "recipient" key? We have tried using
"address" and precompiler returned error
"DIARY-KEY or RECIPIENT must be supplied"

 
We have a customised version of msb284.cbl & msrraf.rdl. We do not send Remittances, PO's & RFQ's via email because of security reasons (we should be eventually), but I have written rdl's to do this. We do send emails via rdl's to internal users with Maintenance Scheduling. We have not used the EMESSAGE or NOTIFY directives in rdl, instead building an email template (output file) in an rdl to use Unix email capabilities (sendmail).
You can also use the SADD table code to store 'other' supplier email addresses, ie. Purchase Order email, Remittance email etc.
 
Thanks Drw, would be interesting to find out more about your solutions.
-What are your security concerns?
-What does you Unix "sendmail" solution involve?

I have previously written RDL using Notify with Recipient being employees.
This request to email suppliers is a bit more complex.
I have now clarified the issue of Recipient types, it should also be able to accept Supplier and Customer. I have found that "S" causes run-time abort, but got a work-around using "E" (employee) and ADDRESS = supplier email, this will override the employee and send email to supplier.

NOTIFY should also be able to pick up the SADD code you mentioned, pass as keyword: EXTRA-DATA = 'DDDDxx', where dddd=district, xx = SADD table-code, but I did not test itv at this stage.

Another problem I am facing is an apparent limitation in the number of lines of the message that can be output by NOTIFY to 20 lines, this does not allow me to list detail of all invoices paid.
 
The security concerns I was talking about were that of our CIO (and the Local Government regulations), where we may have to route the emails through a mail server and attach a digital certificate or somthing similar.
Send email via unix sendmail is quite simple (provided email capabilities are setup on your server). Just construct and rdl output file in the following format. This means there is no limitation on the number of lines to the email. I did however try to limit the output file linelenght to 78 chars, as most email recipents will wrap at a larger line legnth. I guess all we are doing here is using the capabilities of the operating system with rdl.

sendmail user1@domain.com <<?
subject: Email message from MIMS
reply-to: replyuser@domain.com
to: user1@domain.com
from: fromuser@domain.com
Body of email message... write something here, it could be any chars,
including html
?

sendmail user2@domain.com <<?
subject: Email message from MIMS
reply-to: replyuser@domain.com
to: user2@domain.com
from: fromuser@domain.com
Body of email message... write something here, it could be any chars,
including html
?

You will have to excuse the line wrapping on my posting.

After this output file has been created the additional exec statements in the batch.tbl (execute unix commands)

Report1 XXRXXX RENFRP -PARAM XXTXXX,XXTXXX - rename the output file (without the mimsjobnum variable).
Report1 XXRXXX EXEC -PARAM aaa.XXTXXX - this line runs an additional script (aaa) to make a backup
Report1 XXRXXX EXEC -PARAM &quot;chmod a+x XXTXXX&quot; - Change the output file to have execute permissions
Report1 XXRXXX EXEC -PARAM XXTXXX - this line excutes the output file

...and to confirm, the SADD table file is for defining the Supplier Additional Addresses which are stored on MSF201.
 
Drw,

Interesting solution, you've got yourself a star! So this totally bypasses the limitations that may come with NOTIFY.
Thanks a lot, Calator.
 
Drw,

I have now tested your solution which works very well and removes the limitations encountered with NOTIFY.

You had mentioned html inserted in the email body, could you give an example of how this can be used to display a graphics from a file at a certain point in the email (eg the company logo at the very top of the message)?

Another 2 questions:
- is there a way to request a delivery/read confirmation?
- issue with bounced back messages for incorrect userid or domain. The required behaviour is that the MIMS end-user whose email address we output in the &quot;from&quot; and &quot;reply-to&quot; fields, should receive any bounced back messages.
This did happen with some providers, however other replies ended up in the Unix mims account's mail. They appear to be sent to the &quot;return-path&quot; which is displayed as the email address of the Unix MIMS account. This was the case with some internet providers, as well as when the domain itself was misspelled. As a consequence the MIMS user does not find out of the problem. Any ideas of how this could be solved?

many thanks
Calator
 
Inserting html in the email body can be done by including html/xml tags in the rdl. Or, construct a unix script to convert the output to html... (Does anyone know more about html converters? if there is such a unix tool.)
As far as graphics in emails, if u have html tags referencing a graphic, u can uuencode a graphics file (the command 'uuencode graphic.jpg graphic.jpg > graphic.jpg.en' will produce an encoded file graphic.jpg.en) and if you add the encoded ascii text file to the body of the email then it will appear as an attachment to the email when received. You will also have to uuencode the html page than it will appear as an attachment. I was testing this setup about a year ago, and was getting this working, but I have not tried it since.

Perhaps we need to ask more questions on a Unix email forum.... There would have to be many ways of emailing from Unix.

As far as delivery notification, just do a man on sendmail on your unix server... the switch is '-N' (success,failure,delay) on our system.

I'll try and test this all again in the near future.

Drew
 
Hi DRW,
I was unsuccessful with sendmail using html tags and the uuencoded graphic. The message is received in Outlook purely as text.
Also could not find the -N flag for delivery notification. My sendmail man page is totally useless and no examples are provided.
Could you perhaps supply an example of the coding required to implememt the procedures you described?
This is what I tried:

>uuencode graph.tif graph.tif > graph.tif.en

sendmail user@domain <<?
subject: Test
return-path: user@domain
reply-to: user@domain
to: user@domain
from: user@domain
<HTML>
<BODY>
<IMG SRC=&quot;graph.tif.en&quot;>
</BODY>
</HTML>
test html/graphic message
?
 
To clarify my message above, I've only been able to send messages with the following command, I'm still trying to work out how to send these sort of emails more gracefully so we can keep a similar format to that I described above:

cat graphic.png.en htmldoc.html.en|mailx user@domain.com

htmldoc.html contains:
<html>
<head>
<title>Test Doc</title>
</head>
<body>
<p><b><tt><font size=+1>Test Html Doc</font></tt></b><font size=+1></font>
<br><b><tt><font size=+1>
Date 26/07/02</font></tt></b>
<br><img src=&quot;graphic.png&quot;>
</body>
</html>

htmldoc.html.en contains:

begin 644 htmldoc.html
M/&AT;6P^&quot;CQH96%D/@H@(&quot;`\=&ET;&4^5&5S=&quot;!$;V,\+W1I=&QE/@H\+VAE
M860^&quot;CQB;V1Y/@H\<#X\8CX\='0^/&9O;G0@<VEZ93TK,3Y497-T($AT;6P@
M1&]C/&quot;]F;VYT/CPO='0^/&quot;]B/CQF;VYT('-I>F4]*S$^/&quot;]F;VYT/@H\8G(^
M/&(^/'1T/CQF;VYT('-I>F4]*S$^)FYB<W`[&quot;D1A=&4@,C8O,#<O,#(\+V9O
M;G0^/&quot;]T=#X\+V(^&quot;CQB<CX\:6UG('-R8STB;6EN8V]M+G!N9R(^&quot;CPO8F]D
+>3X*/&quot;]H=&UL/@H^
`
end

and graphic.png.en contains:

begin 644 graphic.png
MB5!.1PT*&@H````-24A$4@```&quot;,````C&quot;`(```&quot;1NR0.````&quot;7!(67,```[#
M```.PP'';ZAD````[TE$051XG+W62PZ%(`P%4-;-R)WS!B8BM[_;OD;B1*4]
MEAIQK*_&*,1<8O1+,OL^'4$J5@J>?8P>R3%V0<]1EBP&6Q5A@:0R\D5`2<,MR6+TV2`)SY0:F!/3)9Y1FF1@K,0R:GV6Q##'&U&32.8XAY9(E9'JC&quot;^E&;^@
MLI1@H&$@I1FRH`;)9RRI4!#N21%<E'&quot;[B@K2I2RS/Q,.7)#DYJO\312D+B8A
M*1DSS&quot;'=`597R.M*ST!Z1\HZ>$:=C!*D=L(*#$KO&'5VJL186NY*\CPE+;&2
M<\Y_&$]Z$OEW&8.5K,[S!B4M>AD;I*[QG?0#4V@<?F!V.G,`````245.1*Y&quot;
&quot;8()_
`
end




As far as the -N option...

In the first line of the email file, add the -N option:

sendmail -Nfailure,success,delay user@domain.com <<?
subject: Email message from MIMS


Drew
 
Drw,
Thanks again. This worked and is promising, except for:
- I'ld like to build on the previous concept you put forth using sendmail
- the meesage in Outlook appears as 2 attachment files, one the html the other the graphic, and the recipient has to click & open the html attachment to review the message. I thought it could be nicer if all came in the actual body of the message.

Sendmail -N: I tried it but did not manage to get a notification; or maybe I don't know where to look for it;
I did >mail in the Unix account thinking it would be like another message in the inbox. Maybe that's not the case? The objective in fact would be to have the notification sent to the address listed by 'From' 'reply-to' or 'return-email' keys listed with sendmail.
Regards,
 
The following syntax:
sendmail -f<returnaddress> -Nfailure,success,delay <destination-address> <<?
subject: Test message
etc

has returned a delivery notification as well as bounce back messages in case of failure. Essential is the -f flag that sets the address for return messages. The addresses in the &quot;From:&quot;, &quot;Return-Path&quot; and &quot;Reply-To&quot; headers did not appear to be effective for this purpose.

I still did not manage to get the syntax for a read receipt.
 
Sorry for not responding earlier, I'm back from holidays now.
Glad to see you have worked out how to receive delivery notifications. The read receipts could be dependant on the receivers email client, something to check.
I haven’t done any more testing, but when I do I’ll let u know.

Drew
dwolrige@goldcoast.qld.gov.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top