Giveth / giv-token-contracts

GNU General Public License v3.0
27 stars 8 forks source link

notify reward email #99

Open ae2079 opened 3 months ago

ae2079 commented 3 months ago

use notification center service for sending email

divine-comedian commented 2 months ago

ref https://github.com/Giveth/giveth-dapps-v2/issues/4194

aminlatifi commented 2 months ago

@ae2079 Thanks Ali, can you put a sample email picture here? I want to know how the final email will look like.

ae2079 commented 2 months ago

@ae2079 Thanks Ali, can you put a sample email picture here? I want to know how the final email will look like.

image I test it directly through notification API with this curl:

curl --location 'https://notification.serve.giveth.io/v1/thirdParty/notifications' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bm90aWZ5cmV3YXJkOmtSbW1HTkFpWnZZRnFqbklONzVLdEFxU3JGQ1RzRVBJ' \
--data-raw '{
  "eventName": "Notify reward amount",
  "sendEmail": true,
  "sendSegment": true,
  "creationTime": 1667992708000,
  "segment": {
    "payload": {
       "round": 10,
       "date": "1667992708000",
       "amount": "12134",
       "contractAddress": "0xsfglsjfdflk",
       "farm": "test farm",
       "message": "test message",
       "network": "ethereum",
       "script": "test script",
       "transactionHash": "test txhash",
       "email": "ali@generalmagic.io"
    }
  }
}'