Hi All,
I had created one interface for opening email using mail to. The code for interface is as follows
a!columnsLayout( columns: { a!columnLayout( contents: { a!cardLayout( contents: a!richTextDisplayField( align: "LEFT", labelPosition: "COLLAPSED", value: { a!richTextIcon(icon: "envelope", size: "MEDIUM"), a!richTextItem(text: " ", style: "STRONG"), a!richTextItem( text: "CONSULT SUPPLY CHAIN", style: "STRONG" ) }, /*align: "CENTER"*/ ), link: a!safeLink( uri: "mailto:" & "pradeep@xyz.com" & "?subject=" & "High Risk Material Test Email" & "&body=" & "<html xmlns:v=urn:schemas-microsoft-com:vml xmlns:o=urn:schemas-microsoft-com:office:office xmlns:w=urn:schemas-microsoft-com:office:word xmlns:m=schemas.microsoft.com/.../omml xmlns=www.w3.org/.../REC-html40> <style type=text/css> .tg {border-collapse:collapse;border-spacing: 30px;border: 1px solid black;width:80%} .tg td{font-family:Arial, sans-serif, Rubik;font-size:14px;padding:10px 10px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg th{font-family:Arial, sans-serif, Rubik;font-size:14px;font-weight:normal;padding:10px 10px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal; border: 2px solid black; } .tg .Product-Line { width: 180px; height: 17px; flex-grow: 0; font-family: Rubik; font-size: 14px; font-weight: bold; font-stretch: normal; font-style: normal; line-height: normal; letter-spacing: normal; text-align: left; color: #000; } .tg .ESMA { width: 200px; height: 17px; flex-grow: 0; font-family: Rubik; font-size: 14px; font-weight: bold; font-stretch: normal; font-style: normal; line-height: normal; letter-spacing: normal; text-align: left; color: #000; } .tg .Group { width: 150px; height: 17px; flex-grow: 0; font-family: Rubik; font-size: 14px; font-weight: bold; font-stretch: normal; font-style: normal; line-height: normal; letter-spacing: normal; text-align: left; color: #000; } .tg .Grade { width: 250px; height: 17px; flex-grow: 0; font-family: Rubik; font-size: 14px; font-weight: bold; font-stretch: normal; font-style: normal; line-height: normal; letter-spacing: normal; text-align: left; color: #000; } .tg .Risk { width: 150px; height: 17px; flex-grow: 0; font-family: Rubik; font-size: 14px; font-weight: bold; font-stretch: normal; font-style: normal; line-height: normal; letter-spacing: normal; text-align: left; color: #000; } .tg .Comments { height: 17px; flex-grow: 0; font-family: Rubik; font-size: 14px; font-weight: bold; font-stretch: normal; font-style: normal; line-height: normal; letter-spacing: normal; text-align: left; color: #000; } .tg .data{ font-weight: 500; font-family: Rubik; font-size: 14px; font-stretch: normal; font-style: normal; line-height: normal; } </style> <p>Below are the High Risk Material used in this RTA:</p> <br/> <table class=tg> <tr> <th class=Product-Line>Product Line</th> <th class=Group>Group</th> <th class=Grade>Grade</th> <th class=ESMA >ES-MA-*</th> <th class=Risk>Risk</th> <th class=Comments>Comments</th> </tr><tr><td class=data><a href=www.google.com>Casing Information Requirements</a></td><td class=data>Chrome</td><td class=data>13 CR</td><td class=data>ES-MA-58-4</td><td class=data>High Risk</td><td class=data>Category Managed Supply</td></tr><tr><td class=data><a href=www.google.com>Gauge Mandrel Requirements</a></td><td class=data>Chrome</td><td class=data>25 CR Super Duplex</td><td class=data>ES-MA-66-*</td><td class=data>High Risk</td><td class=data>Limited Mills on AVL</td></tr><tr><td class=data><a href=www.google.com>Gauge Mandrel Requirements</a></td><td class=data>Chrome</td><td class=data>22 CR</td><td class=data>ES-MA-66-(19-27)</td><td class=data>High Risk</td><td class=data>Category Managed Supply</td></tr></table><br/><br/><p>Thanks & Regards,<br/> Admin</p></html>" & "&cc=" & "ABC@xyz.com" ), /*style: "#1c1c1e",*/ shape: "SEMI_ROUNDED", showBorder: true() ) }, width: "NARROW_PLUS" ), })
The issue I'm facing was by clicking the above button (card layout), nothing happens. Then i tried to figure out by commenting mail to (?subject, &body, &cc) lines of code one by one. when i tried to click the button with &body line commented, it is opening the email. So, i request all for your suggestions on how to pass the html text to &body.
Expected output to be displayed in body as follows
Thanks in advance,
Pradeep
Discussion posts and replies are publicly visible
AFAIK, You cannot include HTML code directly in the body of a "mailto" link. It is considered plain text.
Shubham Aware Any other suggestion on how to pass html code?
You can't pass HTML. Build a mini email screen in Appian: "To," "Cc," and "Body" fields. Users fill it out, and a smart service sends the email with the content. This provides a user-friendly way to send formatted emails within Appian.
Shubham Aware Thanks for the reply. So, it means we won't be able to display tables in email using mail to right?
No you can't render HTML.
Shubham Aware will we able to attach documents using mail to function in Appian?