public void Run( [QueueTrigger(QueueNames.Notifications, Connection = "AzureWebJobsStorage")] Notification notification, [SendGrid(ApiKey = "SendGridKey")] out SendGridMessage message, ILogger log) { message = new SendGridMessage(); message.SetFrom(new EmailAddress(_sendGridConfiguration.FromEmail, _sendGridConfiguration.FromName)); message.SetSandBoxMode(_sendGridConfiguration.Sandbox); message.AddInfoFromNotification(notification); log.LogInformation($"Sending notification to {notification.Subscriber}"); }