{"action":"closed","issue":{"url":"https://api.github.com/repos/sendgrid/sendgrid-csharp/issues/97","labels_url":"https://api.github.com/repos/sendgrid/sendgrid-csharp/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/sendgrid/sendgrid-csharp/issues/97/comments","events_url":"https://api.github.com/repos/sendgrid/sendgrid-csharp/issues/97/events","html_url":"https://github.com/sendgrid/sendgrid-csharp/issues/97","id":53778816,"number":97,"title":"BCC not working","user":{"login":"craig-acutest","id":5538351,"avatar_url":"https://avatars.githubusercontent.com/u/5538351?v=3","gravatar_id":"","url":"https://api.github.com/users/craig-acutest","html_url":"https://github.com/craig-acutest","followers_url":"https://api.github.com/users/craig-acutest/followers","following_url":"https://api.github.com/users/craig-acutest/following{/other_user}","gists_url":"https://api.github.com/users/craig-acutest/gists{/gist_id}","starred_url":"https://api.github.com/users/craig-acutest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craig-acutest/subscriptions","organizations_url":"https://api.github.com/users/craig-acutest/orgs","repos_url":"https://api.github.com/users/craig-acutest/repos","events_url":"https://api.github.com/users/craig-acutest/events{/privacy}","received_events_url":"https://api.github.com/users/craig-acutest/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-01-08T17:44:30Z","updated_at":"2015-01-09T16:18:09Z","closed_at":"2015-01-09T16:18:09Z","body":"Here is code I'm using to add a Blind carbon copy:\r\n\r\nmail.AddBcc(staff.Email);\r\n\r\nWhere staff is an object with attributes about the staff member, one of which is email, this being a string containing the staff members email address.\r\n\r\nWe have recently moved our websites to Microsoft Azure, and investigated this as being the best solution to send emails.\r\n\r\nWe rely on sending BCC as this allows many people to get the email our customers get, so that internal company audits can be performed, it is important that the customer not see who is dealing with or who has receive the email.\r\n\r\nPlease can you show me why this isn't working? or if this is a bug i have found, can it be fixed?\r\n\r\nThanks,\r\n\r\nCraig.\r\n\r\nFull code of function below:\r\n\r\n                public void emailQuote(string REFID, int ID)\r\n                        {\r\n            try\r\n            {\r\n                var refno = REFID.ToString().Split('-');\r\n\r\n                var refid = refno[2];\r\n                var custid = refno[1];\r\n                var quoteid = refno[0];\r\n\r\n                var quote = returnQuote(refid, Convert.ToInt32(custid));\r\n\r\n                var customer = returnCustomer(quote.CustomerID);\r\n\r\n                var ASMName = \"\";\r\n\r\n                var mail = new SendGridMessage();\r\n                string EmailTo = \"\";\r\n\r\n                EmailTo = customer.Email;               \r\n\r\n                string directEmailSubject = \"Acutest Direct - New Quotation\";\r\n\r\n                mail.From = new MailAddress(Process.Constants.AcutestDirectEmail);\r\n\r\n                if (quote.ASMID == 0)\r\n                {\r\n                    mail.AddBcc(Process.Constants.AcutestDirectEmail);\r\n                }\r\n                else\r\n                {\r\n                    var staff = AcutestLoginReader.StaffAPI.GetStaffByID(quote.ASMID);\r\n\r\n                    if(staff != null){\r\n                        ASMName = staff.FirstName + \" \" + staff.Surname;\r\n                        mail.AddBcc(staff.Email);\r\n                    }\r\n                                        \r\n                    mail.AddBcc(Process.Constants.AcutestDirectEmail);\r\n                    mail.AddBcc(Process.Constants.AcutestAdmin);\r\n                }\r\n                mail.AddBcc(Process.Constants.AcutestWebTeam);\r\n                mail.AddTo(EmailTo);\r\n                mail.Subject = directEmailSubject;\r\n\r\n                mail.AddAttachment(new MemoryStream(Utilities.Generator.CreatePDF(REFID, Process.Constants.WebsiteAddress, Process.Constants.WebsiteAddress + \"/footerPDF.aspx\")), \"Quotation_\" + refid + \".pdf\");\r\n\r\n                string emailBody = \"<span>AcutestDirect is a Trading Division of Acute Sales Ltd<br/>\" +\r\n                                    \"Century Road<br/>\" +\r\n                                    \"High Carr Business Park<br/>\" +\r\n                                    \"Newcastle-under-Lyme<br/>\" +\r\n                                    \"Staffordshire<br/>\" +\r\n                                    \"ST5 7UG<br/></span><br/><br/>\";\r\n\r\n                emailBody += \"<span>The information contained in this electronic mail message is confidential. It is intended solely for the use of the individual \" +\r\n                \"or entity to whom it is addressed and others authorised to receive it. If the reader of this message is not the intended recipient, \" +\r\n                \"you are hereby notified that any use, copying, dissemination or disclosure of this information is strictly prohibited.</span><br/><br/>\";\r\n\r\n                mail.Html = \"Hello \" + customer.FirstName + \" \" + customer.Surname + \",<br/><br/>Please find attached your quotation.<br/><br/>\" +\r\n                    \"Kind Regards,<br/><br/>\" + ASMName + \"<br/>Area Sales Manager\" + \"<br/><br/>\" + emailBody;\r\n\r\n                var credentials = new NetworkCredential(Constants.SendGridUsr, Constants.SendGridPwd);\r\n\r\n                var transportWeb = new Web(credentials);\r\n\r\n                transportWeb.Deliver(mail);\r\n            }\r\n            catch (Exception err)\r\n            {\r\n                Elmah.ErrorSignal.FromCurrentContext().Raise(err);\r\n                emailError(\"emailDeclineQuote\", \"Email:\" + Process.Constants.AcutestDirectEmail + \" Error:\" + err.ToString());\r\n            }\r\n        }\r\n\r\n"}}