Skip to content

Commit

Permalink
All tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Goldman committed Jul 18, 2020
1 parent c7fa790 commit a2a4b95
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 4 additions & 5 deletions FluentEmail.Graph.Tests/GraphSenderTests.cs
Expand Up @@ -14,8 +14,7 @@ public class Tests
const string tenantId = ""; //Add your AAD Tenant ID here
const string graphSecret = ""; //Add your AAD Graph Client Secret here
const string senderEmail = ""; //Add a sender email address from your Office 365 tenant
const string toEmail = "fluentEmail@mailinator.com";
const string toName = "FluentEmail Mailinator";
const string toEmail = "fluentemail@mailinator.com"; //change this if you like
private bool saveSent = false;

[SetUp]
Expand Down Expand Up @@ -50,7 +49,7 @@ public async Task CanSendEmailAsync()
var email = Email
.From(senderEmail)
.To(toEmail)
.Subject("Test Email")
.Subject("Test Async Email")
.Body("Test email from Graph sender unit test");

var response = await email.SendAsync();
Expand All @@ -76,7 +75,7 @@ public async Task CanSendEmailWithAttachments()
var email = Email
.From(senderEmail)
.To(toEmail)
.Subject("Test Email")
.Subject("Test Email with Attachments")
.Body("Test email from Graph sender unit test")
.Attach(attachment);

Expand All @@ -90,7 +89,7 @@ public async Task CanSendHighPriorityEmail()
var email = Email
.From(senderEmail)
.To(toEmail)
.Subject("Test Email")
.Subject("Test High Priority Email")
.Body("Test email from Graph sender unit test")
.HighPriority();

Expand Down
3 changes: 3 additions & 0 deletions FluentEmail.Graph/GraphSender.cs
Expand Up @@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

Expand Down Expand Up @@ -120,6 +121,8 @@ public async Task<SendResponse> SendAsync(IFluentEmail email, CancellationToken?

if(email.Data.Attachments != null && email.Data.Attachments.Count > 0)
{
message.Attachments = new MessageAttachmentsCollectionPage();

email.Data.Attachments.ForEach(a =>
{
var attachment = new FileAttachment
Expand Down

0 comments on commit a2a4b95

Please sign in to comment.