@@ -172,7 +172,7 @@ public void SetIpPool(string pool)
172172
173173 /// <summary>
174174 /// 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/
176176 /// </summary>
177177 /// <param name="sendTime">DateTime representing the time to send the email. See docs for limitations. </param>
178178 public void SetSendAt ( DateTime sendTime )
@@ -181,16 +181,37 @@ public void SetSendAt(DateTime sendTime)
181181 _settings . AddSetting ( keys , Utils . DateTimeToUnixTimestamp ( sendTime ) ) ;
182182 }
183183
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+
184195 /// <summary>
185196 /// 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/
187198 /// </summary>
188199 /// <param name="sendDateTimes">A collection of DateTimes, with each time corresponding to one recipient in the SMTP API header</param>
189200 public void SetSendEachAt ( IEnumerable < DateTime > sendDateTimes )
190201 {
191202 _settings . AddArray ( new List < string > { "send_each_at" } , sendDateTimes . Select ( Utils . DateTimeToUnixTimestamp ) . Cast < object > ( ) . ToArray ( ) ) ;
192203 }
193204
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+
194215 #endregion
195216 }
196- }
217+ }
0 commit comments