How Do Huawei Cloud Astro Zero Developers Use Their Own Email Addresses to Send Emails?
Description
When sending an email using the Send Email diagram element in a flow or the sendEmail method in a script, the default sender is the email address configured on the platform. You can perform the following operations to use your own email address to send emails.
Solution
Try either of the following:
- Use the sendCustomEmail method provided in the script.
Method: sendCustomEmail(userName: string, password: string, sender: string,template: string, input: Map, smtpHost string)
- userName and password: username and password for logging in to the mailbox
- sender: email address of the sender
- template: (optional) name of the email template used to send emails
- smtpHost: (optional) email server. The sender email address must match the email server.
- input: email recipient (Address: a string. Separate multiple address by semicolons), email subject (Subject: a string), and email content (Body: a string)
After the email-sending script is defined, you can call it in a flow to send emails using the tenant's own email address. The Send Email diagram element is no longer needed.
- Configure a connector to connect to the SMTP, and call the connector in a flow or script to send emails. For details, see Interconnecting with SMTP to Send Emails.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot