Focal Point
[CLOSED] Using EDAMAIL to send message with an attachment

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9667086676

June 12, 2015, 09:01 AM
Teri Newton
[CLOSED] Using EDAMAIL to send message with an attachment
I have successfully been using EDAMAIL for a while now. One particular application sends email to the project manager upon rejection of charges. They would also like to get a spreadsheet of the charges.

Ideally, I would like to add an attachment to the current email. The best I have been able to accomplish is sending two emails: 1) body, 2) attachment.

 
EX EDAMAIL toaddr=tnewton@belcan.com, from=CIS@belcan.com, subject=Rejected Invoice Notice, filetype=HTML, filename=BODY_FILE

EX EDAMAIL toaddr=tnewton@belcan.com, from=CIS@belcan.com, subject=Rejected Invoice Spreadsheet, flags=A, filetype=XLSX, filename=EXCEL_FILE


I will even settle for sending both as attachments as long as they are in the same email. I read somewhere that you could by placing a semi-colon between filenames. However, that has not worked for me.

Any suggestions would be greatly appreciated.

This message has been edited. Last edited by: Teri Newton,



June 16, 2015, 01:51 PM
dhagen
Doc states external file as attachment OR message body. However, review the syntax. You could probably use the multi-line inline message example with an attachment if you are clever with it.

Syntax


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
June 19, 2015, 09:16 AM
Teri Newton
Thank you, dhagen! That link has been very useful. I can think of many uses for EX EDAPUT.

I could not think of a clever way to use the multi-line message and the clock was ticking. My final solution was to send a hyperlink to the spreadsheet in the message body.
June 30, 2015, 11:52 AM
dhagen
I was thinking something more like this:

FILEDEF TOUT DISK tout.ftm
TABLE FILE IBISAMP/CAR 
PRINT MODEL BY COUNTRY BY CAR 
ON TABLE HOLD AS TOUT FORMAT WP
END
-RUN
-SET &BM = &LINES;
 
FILEDEF TOUT1 DISK tout1.htm
TABLE FILE IBISAMP/CAR 
PRINT MODEL BY COUNTRY BY CAR 
ON TABLE HOLD AS THTML FORMAT HTML
END
-RUN

EX -LINES *  EDAMAIL
TOADDR=dhagen@focalpoint.com, 
SUBJECT=This is a Subject, 
FLAGS=A, 
FILETYPE=HTML, 
FILENAME=thtml.htm, 
MESSAGE=
-REPEAT :EL FOR &I FROM 1 TO &BM;
-READ TOUT &L.A40.
&L
-:EL
EDAMAIL*
-RUN  


You would have to work on the -READ to verify the size, but that should be easy to figure out.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott