我有一個表格,其中列出了幾個不同的電子郵件和專案。我正在嘗試向所有帶有專案的電子郵件發送電子郵件(每當按下按鈕時),例如:

按下按鈕時應該發送這樣的電子郵件:
“親愛的 [email protected],您的購物車已準備好商品 ??1 和商品 2。”
我知道如何使用 Apex Items 發送電子郵件,但我不知道如何使用表格中的資訊來發送電子郵件。有誰知道這是怎么做到的嗎?
謝謝!
uj5u.com熱心網友回復:
這可能是一種選擇:創建一個在按下按鈕時運行的程序;它讀取表格內容并將專案串列“聚合”到訊息文本中。
正如您已經知道如何發送郵件,我希望這足以讓您使用它。
SQL> with test (user_email, item) as
2 -- sample data
3 (select '[email protected]', 'item 1' from dual union all
4 select '[email protected]', 'item 2' from dual union all
5 --
6 select '[email protected]', 'item 1' from dual union all
7 select '[email protected]', 'item 2' from dual union all
8 select '[email protected]', 'item 3' from dual
9 )
10 -- code you might be interested in
11 select user_email,
12 'Dear ' || user_email ||', your cart is ready with ' ||
13 listagg(item, ', ') within group (order by item) as message_text
14 from test
15 group by user_email
16 /
USER_EMAIL MESSAGE_TEXT
------------ ----------------------------------------------------------------------
123@mail.com Dear 123@mail.com, your cart is ready with item 1, item 2, item 3
abc@mail.com Dear abc@mail.com, your cart is ready with item 1, item 2
SQL>
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/312928.html
