Focal Point
[SOLVED]EDAMAIL(Inline Report) Contains HTML Tags

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

June 22, 2012, 09:30 AM
Gun
[SOLVED]EDAMAIL(Inline Report) Contains HTML Tags
Code:

DEFINE FILE CAR
MSG/A1000='Your file has been uploaded...';
END
TABLE FILE CAR
SUM MSG
WHERE COUNTRY EQ 'ENGLAND';
ON TABLE HOLD AS MAIL_FILE FORMAT HTML
END

-RUN
-MRNOEDIT EX EDAMAIL person@abc.com,,Your ID,,HTML,MAIL_FILE

I have removed the "A", Since, I want the body to be

"Your file is uploaded"

But I get the below in my mail. I need to remove these tags. Any thoughts.

< !--Olap java_script-->
HTML
HEAD
META name="HandheldFriendly" content="True"
META name="PalmComputingPlatform" content="True"
TITLE WebFOCUS Report /TITLE
/HEAD
BODY
TABLE BORDER CELLPADDING=1
TR
TD
Your file has been uploaded.../TD
/TR
/TABLE
/BODY
/HTML

Thank you

This message has been edited. Last edited by: Gun,


7.7, Windows, HTML
June 22, 2012, 10:16 AM
jodye
Hi Gun

We use edamail a lot. It is an under appreciated feature. One use is for deferred reports. When the report finishes... we send an email to the user saying "your report is ready to be viewed... etc".

Anyway, if you just want to send an informative email...like "your file has been uploaded" and you don't care about HTML. Try this.

 

-SET &&TMPPATHDEF=TEMPPATH (60,'A60');
-SET &MAIL_FILE=&&TMPPATHDEF || 'maildef.txt';
FILEDEF MAILDEF DISK &MAIL_FILE
-RUN

-SET &TIMEIS = HHMMSS('A8');
-SET &HH = EDIT(&TIMEIS,'99$$$$$$');
-SET &MM = EDIT(&TIMEIS,'$$$99$$$');
-SET &SS = EDIT(&TIMEIS,'$$$$$$99');
-SET &NOWDATE=&YYMD;
-SET &THEYY=EDIT(&NOWDATE, '9999$$$$');
-SET &THEMMO=EDIT(&NOWDATE, '$$$$99$$');
-SET &THEDD=EDIT(&NOWDATE, '$$$$$$99');
-SET &CURDATE='Current Date = ' | &THEMMO | '/' | &THEDD | '/' | &THEYY;
-SET &CURTIME='Current Time = ' | &HH | ':' | &MM | ':' | &SS;

-WRITE MAILDEF Your file has been uploaded
-WRITE MAILDEF
-WRITE MAILDEF &CURDATE
-WRITE MAILDEF &CURTIME

-RUN
-MRNOEDIT EX EDAMAIL someone@xxx.com,,subject goes here,,TXT,MAILDEF
 


Hope that helps.


WF 8.0.0.5M
June 25, 2012, 10:28 AM
DavSmith
Using jody'e code, here's a modified effort using reduced code:

If all you're showing in the body is the data/time, I prefer to show the date/time in the subject so it can be seen without having to open the email and leave the body as blank, especially if viewing on a mobile device. Also, seeing am/pm is easier for non-military types.

FILEDEF MAILDEF DISK MAILDEF.TXT
-RUN
-SET &ADTTM=HCNVRT(HGETC(10,'HMDYYIa'),'(HMDYYIa)',20,'A20');
-WRITE MAILDEF
-MRNOEDIT EX EDAMAIL someone@xxx.com,,Your Super Deluxe File has been uploaded: &ADTTM,,TXT,MAILDEF




In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle
June 27, 2012, 02:42 AM
Gun
Thank you jodye and DavSmith, Your suggestions were helpful and i have implemented it. Thank you again.


7.7, Windows, HTML