How to Send Emails with Multiple Categories via SendGrid in C#?

It is somewhat hidden in the documentation, but you can send emails with multiple categories if you install SendGrid package with Version 1.2.1 in your C# project.

Here is a sample code:

public void SendHTMLEmailCategory(MailMessage msgMail, List<string> recipients, string sender, IEnumerable<string> categories)
{
//create a new message object
var message = SendGridMail.SendGrid.GetInstance();

//We want to add the recipients to the X-SMTPAPI header
message.Header.AddTo(recipients);

//Even though we added recipients to the Header, the envelope must also have a valid recipient
message.AddTo("xxxx@yyyy.com");

//set the sender
message.From = new MailAddress(sender);

//set the message body
message.Html = msgMail.Body;

//set the message subject
message.Subject = msgMail.Subject;

message.SetCategories(categories);

//create an instance of the Web transport mechanism
var transportInstance = Web.GetInstance(new NetworkCredential(_username, _password));

//send the mail
transportInstance.Deliver(message);
}

 

For some reason, SendGrid has a dependency on the following packages:

  • Microsoft.Net.Http (Microsoft HTTP Client Libraries)
  • Microsoft.Bcl.Async (Microsoft Async)

All dependent projects MUST also install these packages.  When I did an upgrade, it impacted many projects.

Windows: How to edit/delete network drive saved passwords

If you have connected and entered username/password for some network drives, Windows will save them automatically so you don’t need to re-enter them.

However, there are times when you want to edit or delete them.  For example, you might want to limit the access level by switching to a different account.

  1. Control Panel
  2. User Accounts and Family Safety
  3. Credential Manager

or

  1. Press “Window Button” to bring the windows start menu
  2. Type “Credential Manager” and enter.image

 

Once Credential Manager launces,

  1. Select one of the credentials listed and click the “down arrow” to expand.
  2. Click “Edit” to edit or “Remove from vault” to delete.

How to Enable Google+ for Google Apps User

Goal:

If you or the person you’re in a Hangout with doesn’t have a Google+ account, you can start or join a limited video call, which is a one-on-one video call.  You will note that your URL has “lite” in it.

But, if you upgrade to a full Google+ account you get access to all Hangouts’ features including the ability to:

  • Start a video call with up to 9 people
  • Share your screen
  • Use apps in the video call

Upgrade to a free Google+ account at plus.google.com.

Problem:

Google provides poor documentation on how to enable Google+ for existing Google Apps User.

https://support.google.com/a/answer/1631746

I logged in as admin and I don’t see Google+ listed in Admin console –> Google Apps –> Add Services.

Solution:

  1. I go to Admin console –> Users. 
  2. Select an admin user.
  3. Select “x More Google services enabled”
  4. Select Google+
  5. Set to “ON for everyone”
  6. Each user must sign up (e.g. upgrade) at plus.google.com.  Be sure to put in an age older than 17.