You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/email/send-email-advanced/includes/inline-attachments-azcli.md
+47-15Lines changed: 47 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,49 +75,77 @@ After you add the environment variable, run `source ~/.bash_profile` from your c
--html "<html><head><title>Welcome to Azure Communication Services Email</title></head><body><h1>This email message is sent from Azure Communication Services Email using Azure CLI.</h1><img src='cid:<my-inline-image>' alt='<alternatetext>'/></body></html>"
86
+
--attachment-types "<inlineattachmenttype1>" # MIME type of the content being attached. Example: "png"
--html "<html><head><title>Welcome to Azure Communication Services Email</title></head><body><h1>This email message is sent from Azure Communication Services Email using Azure CLI.</h1><img src='cid:<contentid>' alt='<alternatetext>'/></body></html>"
89
+
```
90
+
Make these replacements in the code:
91
+
92
+
- Replace `<yourConnectionString>` with your connection string.
93
+
- Replace `<[email protected]>` with the email address you would like to send a message to.
94
+
- Replace `<[email protected]>` with the MailFrom address of your verified domain.
95
+
- Replace `<inlineattachmenttype1>` with the actual attchment type of the file.
96
+
- Replace `<filepath>/<contentid>` with the file path to your attachment and the cid name or id for your inline attachment.
97
+
- Replace `<contentid>` with the CID for your inline attachment, which is referred to in the img src part of the HTML.
98
+
- Replace `<alternatetext>` with a descriptive text for the image to help with accessibility.
99
+
100
+
## Send an email message with attachment and inline attachment
--subject "Welcome to Azure Communication Services Email"
108
+
--attachment-types "<attachmenttype1>" "<inlineattachmenttype1>" # MIME type of the content being attached. Example1: "jpg" "png" & Example2: "png" "png"
--html "<html><head><title>Welcome to Azure Communication Services Email</title></head><body><h1>This email message is sent from Azure Communication Services Email using Azure CLI.</h1><img src='cid:<contentid>' alt='<alternatetext>'/></body></html>"
89
112
```
90
113
91
114
Make these replacements in the code:
92
115
93
116
- Replace `<yourConnectionString>` with your connection string.
94
117
- Replace `<[email protected]>` with the email address you would like to send a message to.
95
118
- Replace `<[email protected]>` with the MailFrom address of your verified domain.
96
-
- Replace `<attachmenttype>` with the actual attchment type of the file.
97
-
- Replace `<filepath>/<my-inline-image>` with the file path to your attachment and the cid name or id for your inline attachment.
98
-
- Replace `<my-inline-image>` with the CID for your inline attachment, which is referred to in the img src part of the HTML.
119
+
- Replace `<attachmenttype1>``<inlineattachmenttype1>` with the actual attchment type of the file.
120
+
- Replace `<filepath>` with the file path to your attachment.
121
+
- Replace `<filepath>/<contentid>` with the file path to your attachment and the cid name or id for your inline attachment.
122
+
- Replace `<contentid>` with the CID for your inline attachment, which is referred to in the img src part of the HTML.
123
+
- Replace `<alternatetext>` with a descriptive text for the image to help with accessibility.
99
124
100
-
## Send an email message with multiple inline attachments
125
+
## Send an email message with multiple attachments and inline attachments
--html "<html><head><title>Welcome to Azure Communication Services Email</title></head><body><h1>This email message is sent from Azure Communication Services Email using Azure CLI.</h1><img src='cid:<my-inline-image1>' alt='<alternatetext>'/><img src='cid:<my-inline-image2>' alt='<alternatetext>'/><img src='cid:<my-inline-image3>' alt='<alternatetext>'/></body></html>"
133
+
--attachment-types "<attachmenttype1>" "<attachmenttype2>" "<inlineattachmenttype1>" "<inlineattachmenttype2>" "<inlineattachmenttype3>" # MIME type of the content being attached. Example: "png" "jpg" "png" "jpg" "bmp"
--html "<html><head><title>Welcome to Azure Communication Services Email</title></head><body><h1>This email message is sent from Azure Communication Services Email using Azure CLI.</h1><img src='cid:<contentid1>' alt='<alternatetext>'/><img src='cid:<contentid2>' alt='<alternatetext>'/><img src='cid:<contentid3>' alt='<alternatetext>'/></body></html>"
111
137
```
112
138
113
139
Make these replacements in the code:
114
140
115
141
- Replace `<yourConnectionString>` with your connection string.
116
142
- Replace `<[email protected]>` with the email address you would like to send a message to.
117
143
- Replace `<[email protected]>` with the MailFrom address of your verified domain.
118
-
- Replace `<attachmenttype1>``<attachmenttype2>``<attachmenttype3>` with the actual attchment type of the file.
119
-
- Replace `<filepath1>/<my-inline-image1>``<filepath2>/<my-inline-image2>``<filepath3>/<my-inline-image13>` with the file path to your attachment and the cid name or id for your inline attachment.
120
-
- Replace `<my-inline-image1>``<my-inline-image2>``<my-inline-image3>` with the CID for your inline attachment, which is referred to in the img src part of the HTML.
144
+
- Replace `<attachmenttype1>``<attachmenttype2>``<inlineattachmenttype1>``<inlineattachmenttype2>``<inlineattachmenttype3>` with the actual attchment types of the file.
145
+
- Replace `<filepath1>``<filepath2>` with the file paths to your attachment.
146
+
- Replace `<filepath1>/<contentid1>``<filepath2>/<contentid2>``<filepath3>/<contentid3>` with the file paths to your attachment and the cid name or id for your inline attachment.
147
+
- Replace `<contentid1>``<contentid2>``<contentid3>` with the CID for your inline attachment, which is referred to in the img src part of the HTML.
148
+
- Replace `<alternatetext>` with a descriptive text for the image to help with accessibility.
121
149
122
150
The above command also performs a polling on the messageId and returns the status of the email delivery. The status can be one of the following:
123
151
@@ -143,9 +171,13 @@ The following optional parameters are available in Azure CLI.
143
171
144
172
-`--attachments` sets the list of email attachments.
145
173
174
+
>[!NOTE]
175
+
> Please note that we limit the total size of an email request (which includes both regular and inline attachments) to 10MB.
176
+
146
177
-`--attachment-types` sets the list of email attachment types, in the same order of attachments.
147
178
148
179
-`--inline-attachment` parameter embeds an attachment directly within the email body, instead of as a separate downloadable file. It is commonly used for images or media files that should appear inline in the email content.
149
180
150
-
Also, you can use a list of recipients with `--cc` and `--bcc` similar to `--to`. There needs to be at least one recipient in `--to` or `--cc` or `--bcc`.
181
+
>[!NOTE]
182
+
> There needs to be at least one recipient in `--to` or `--cc` or `--bcc`.
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/email/send-email-advanced/includes/inline-attachments-java.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,10 @@ ms.topic: include
10
10
ms.service: azure-communication-services
11
11
---
12
12
13
+
Get started with Azure Communication Services by using java to send Email messages.
14
+
15
+
Completing this quick start incurs a small cost of a few USD cents or less in your Azure account.
16
+
13
17
## Send an email message with inline attachments
14
18
15
19
We can add an inline attachment by defining one or more EmailAttachment objects, defining a unique `ContentId` for each, and adding them to our EmailMessage object. Read the attachment file and encode it using Base64.
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/email/send-email-advanced/includes/inline-attachments-js.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,10 @@ ms.topic: include
10
10
ms.service: azure-communication-services
11
11
---
12
12
13
+
Get started with Azure Communication Services by using javascript to send Email messages.
14
+
15
+
Completing this quick start incurs a small cost of a few USD cents or less in your Azure account.
16
+
13
17
## Send an email message with inline attachments
14
18
15
19
We can add an inline attachment by defining one or more attachment objects, making sure to include a unique `contentId` for each, and adding them to our message. Read the attachment file and encode it using Base64.
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/email/send-email-advanced/includes/inline-attachments-net.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,10 @@ ms.topic: include
10
10
ms.service: azure-communication-services
11
11
---
12
12
13
+
Get started with Azure Communication Services by using csharp to send Email messages.
14
+
15
+
Completing this quick start incurs a small cost of a few USD cents or less in your Azure account.
16
+
13
17
## Send an email message with inline attachments
14
18
15
19
We can add an inline attachment by defining one or more EmailAttachment objects, defining a unique `ContentId` for each, and adding them to our EmailMessage object. Read the attachment file and encode it using Base64.
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/email/send-email-advanced/includes/inline-attachments-powershell.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,10 @@ The following optional parameters are available in Azure PowerShell.
152
152
153
153
-`ContentPlainText` used to specify the plain text body of the email.
154
154
155
-
-`Attachment` sets the list of email attachments and inline attachments. This parameter accepts an array of file paths or attachment objects. Please note that we limit the total size of an email request (which includes both regular and inline attachments) to 10MB.
155
+
-`Attachment` sets the list of email attachments and inline attachments. This parameter accepts an array of file paths or attachment objects.
156
+
157
+
>[!NOTE]
158
+
> Please note that we limit the total size of an email request (which includes both regular and inline attachments) to 10MB.
156
159
157
160
-`Header` custom email headers to be passed and sets email importance level (high, normal, or low).
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/email/send-email-advanced/includes/inline-attachments-python.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,10 @@ ms.topic: include
10
10
ms.service: azure-communication-services
11
11
---
12
12
13
+
Get started with Azure Communication Services by using python to send Email messages.
14
+
15
+
Completing this quick start incurs a small cost of a few USD cents or less in your Azure account.
16
+
13
17
## Send an email message with inline attachments
14
18
15
19
We can add an inline attachment by defining one or more `attachments`, making sure to include a unique `contentId` for each, and adding them to our message. Read the attachment file and encode it using Base64. Decode the bytes as a string and pass it into the `attachment` object.
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/email/send-email-advanced/send-email-with-inline-attachments.md
0 commit comments