'How to get SendGrid bulk-email statuses in C#
I need to send an emails (bulk sending), and I have two cases:
- The same email sent into multiple recipients
- Different emails sent into different recipients
How, in both cases, I can control statuses?
First case will return single x-message-id, but how it can be translated into separate status for each recipients? (delivered, opened and so on?)
Second case, I believe, need to be done by sending one-by one, is that correct? Or there is also method to send bulk emails in that case?
I'm using C# and official .NET library.
Solution 1:[1]
IoT Central uses the Device Provisioning Service to handle device provisioning - this approach replaces the use of connection strings as described in the previous answer.
You can use MQTT to interact with IoT Central's DPS instance and retrieve device connection details. This article provides the information you need: https://docs.microsoft.com/azure/iot-dps/iot-dps-mqtt-support
Alternatively, you could run a separate script to generate a connection string for your device to use. For an example of the type of code the script should run, see https://github.com/Azure/azure-iot-sdk-node/blob/main/device/samples/javascript/pnp_simple_thermostat.js. In particular the provisionDevice function.
Solution 2:[2]
Such feature is not available anymore. It was possible to get hostname of IoT Hub used in IoT Central some time ago, but from Jan 31 2020 it was depreciated. https://github.com/Azure/dps-keygen#retrieve-hub-connection-string-deprecated
You can use Azure IoT Central Device Bridge for your case https://docs.microsoft.com/en-us/azure/iot-central/core/howto-build-iotc-device-bridge But you'll need to have some additional services running on Azure.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dominic Betts |
| Solution 2 |
