This topic was automatically generated from Slack. You can find the original thread here.
In HTTP Raw Request Body, i had provided the template content and all the field field up.
How come in Mandrill return value showing 0.
This topic was automatically generated from Slack. You can find the original thread here.
In HTTP Raw Request Body, i had provided the template content and all the field field up.
How come in Mandrill return value showing 0.
It seems like you’re experiencing an issue with sending a request to the Mandrill API and receiving an unexpected response. To help you further, I’ll need a bit more information: 1. Could you provide more details on the specific API endpoint you’re calling? 2. What is the exact response you’re receiving from Mandrill? 3. Are there any error messages or status codes included in the response? 4. Can you share the relevant portion of your code (without sensitive information like API keys)? With this information, I can assist you better in troubleshooting the issue. If you’re still facing difficulties, you can also visit https://pipedream.com/support for more support options.
if i want to send using mandrill, will it send one by one if i give like 30 email (array)?
To send emails using Mandrill to multiple recipients, you can provide an array of email addresses in the to
field of the Mandrill API request. Mandrill will handle sending the emails to each recipient individually. Here’s an example of how you can set up a Pipedream component to send an email to multiple recipients using Mandrill: import { axios } from "@pipedream/platform"; export default defineComponent({ props: { mandrill: { type: "app", app: "mandrill", }, emails: { type: "string[]", label: "Email Addresses", description: "List of email addresses to send the email to", }, subject: { type: "string", label: "Subject", description: "Subject of the email", }, html: { type: "string", label: "HTML Content", description: "HTML content of the email", }, text: { type: "string", label: "Text Content", description: "Text content of the email", }, from_email: { type: "string", label: "From Email", description: "Email address of the sender", }, from_name: { type: "string", label: "From Name", description: "Name of the sender", }, }, async run({ steps, $ }) { const recipients = this.emails.map(email => ({ email, type: "to", })); const data = { key: this.mandrill.$auth.api_key, message: { html: this.html, text: this.text, subject: this.subject, from_email: this.from_email, from_name: this.from_name, to: recipients, }, }; return await axios($, { method: "post", url: `https://mandrillapp.com/api/1.0/messages/send.json`, data, }); }, });
### Explanation: - Props: The component accepts several props, including an array of email addresses (emails
), subject, HTML content, text content, and sender details. - Recipients: The emails
array is mapped to create an array of recipient objects, each with an email
and type
field. - Mandrill API Request: The request is made to the Mandrill API to send the email to all specified recipients. This setup will send the email to each recipient in the emails
array individually.