How can I send an email with an attachment from the editing screen?
Answer¶
Please use the "Email Sending API" and "Attachment Retrieval API" in the "Script".
Overview¶
This is a sample code that uses the "Email Sending API" and "Attachment Retrieval API" to send an email with a file registered in the "Attachments column" (AttachmentsA) attached.
Cautions¶
- Pleasanter version 1.5.0.0 and later had a bug that corrupted attached files. This bug has been fixed in version 1.5.3.0. If you use the function to send emails with attachments, do not use Pleasanter versions 1.5.0.0 to 1.5.2.0.
Prerequisites¶
- "Email Sending Settings" are required.
- You need the "Pleasanter.net" Standard Plan contract.
- "Site Administrator Permission" is required to set up.
Operation Image¶
The sending process is executed when the send button set in the extended HTML is clicked. To:, Cc:, Bcc:, Subject and Body are set to the values of the corresponding column(column with the same name displayed).
Operation Procedure¶
- Create a table.
- Create a new "Script" and enter the contents of the following script. Check "Edit" for the output destination and click the Add button.
- From the "Editor", enable AttachmentsA according to the sample code below.
- Open the "Extended HTML" tab in the advanced settings of AttachmentsA, enter the following HTML, and click the Update button.
- Click the [+New] button to create a new record.
- Register any file in Attachments and click the Create button.
- Click the Send button and verify that the email is sent.
Code Samples¶
| HTML | |
|---|---|
| JavaScript | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
