@@ -172,7 +172,7 @@ public void SetIpPool(string pool)
172
172
173
173
/// <summary>
174
174
/// Schedule the email to be sent in the future. You can find further documentation about scheduled sends here:
175
- /// https://sendgrid.com/docs/API_Reference/SMTP_API/scheduling_parameters.html
175
+ /// https://sendgrid.com/docs/for-developers/sending-email/scheduling-parameters/
176
176
/// </summary>
177
177
/// <param name="sendTime">DateTime representing the time to send the email. See docs for limitations. </param>
178
178
public void SetSendAt ( DateTime sendTime )
@@ -181,16 +181,37 @@ public void SetSendAt(DateTime sendTime)
181
181
_settings . AddSetting ( keys , Utils . DateTimeToUnixTimestamp ( sendTime ) ) ;
182
182
}
183
183
184
+ /// <summary>
185
+ /// Schedule the email to be sent in the future. You can find further documentation about scheduled sends here:
186
+ /// https://sendgrid.com/docs/for-developers/sending-email/scheduling-parameters/
187
+ /// </summary>
188
+ /// <param name="sendTime">DateTimeOffset representing the time to send the email. See docs for limitations. </param>
189
+ public void SetSendAt ( DateTimeOffset sendTime )
190
+ {
191
+ var keys = new List < string > { "send_at" } ;
192
+ _settings . AddSetting ( keys , Utils . DateTimeOffsetToUnixTimestamp ( sendTime ) ) ;
193
+ }
194
+
184
195
/// <summary>
185
196
/// Schedule each email in your batch to be sent at a specific time in the future. You can find further documentation about scheduled sends here:
186
- /// https://sendgrid.com/docs/API_Reference/SMTP_API/scheduling_parameters.html
197
+ /// https://sendgrid.com/docs/for-developers/sending-email/scheduling-parameters/
187
198
/// </summary>
188
199
/// <param name="sendDateTimes">A collection of DateTimes, with each time corresponding to one recipient in the SMTP API header</param>
189
200
public void SetSendEachAt ( IEnumerable < DateTime > sendDateTimes )
190
201
{
191
202
_settings . AddArray ( new List < string > { "send_each_at" } , sendDateTimes . Select ( Utils . DateTimeToUnixTimestamp ) . Cast < object > ( ) . ToArray ( ) ) ;
192
203
}
193
204
205
+ /// <summary>
206
+ /// Schedule each email in your batch to be sent at a specific time in the future. You can find further documentation about scheduled sends here:
207
+ /// https://sendgrid.com/docs/for-developers/sending-email/scheduling-parameters/
208
+ /// </summary>
209
+ /// <param name="sendDateTimes">A collection of DateTimeOffsets, with each time corresponding to one recipient in the SMTP API header</param>
210
+ public void SetSendEachAt ( IEnumerable < DateTimeOffset > sendDateTimes )
211
+ {
212
+ _settings . AddArray ( new List < string > { "send_each_at" } , sendDateTimes . Select ( Utils . DateTimeOffsetToUnixTimestamp ) . Cast < object > ( ) . ToArray ( ) ) ;
213
+ }
214
+
194
215
#endregion
195
216
}
196
- }
217
+ }
0 commit comments