Closed craig-acutest closed 9 years ago
outdated
@0xdeafcafe BCC was put back in in 5.0.0 and the web api supports it now https://github.com/sendgrid/sendgrid-csharp/blob/master/SendGrid/SendGridMail/SendGrid.cs#L188-L197
Not sure what's going on here
@brandonmwest oops! removed my comment.
@craig-acutest could you set up fiddler and inspect the request going out?
@0xdeafcafe I will do now...
Is there anything in particular I'm looking for?
thanks
Here is output:
HTTP/1.1 200 Connection Established FiddlerGateway: Direct StartTime: 18:38:03.204 Connection: close EndTime: 18:39:10.161 ClientToServerBytes: 249659 ServerToClientBytes: 5470
This is a CONNECT tunnel, through which encrypted HTTPS traffic flows. To view the encrypted sessions inside this tunnel, enable the Tools > Fiddler Options > HTTPS > Decrypt HTTPS traffic option.
A SSLv3-compatible ServerHello handshake was found. Fiddler extracted the parameters below.
Version: 3.1 (TLS/1.0) SessionID: empty Random: 54 AE CE 8B 86 FA 19 F3 A4 14 16 07 E8 C4 41 07 E0 15 C0 EB 14 A2 BE B0 0F 87 10 7A DC 18 CE 11 Cipher: TLS_RSA_AES_128_SHA [0x002F] CompressionSuite: NO_COMPRESSION [0x00] Extensions: renegotiation_info 00 SessionTicket empty
You'll have to add the fiddler https cert to your system, and allow it to sniff HTTPS packets. The instructions on doing so are listed in that output.
When you've done that, you'll be able to see the POST payload, and the headers of the request.
Here is decrypted output, with API details HIDDEN:
--5d906b49-b109-4796-b3d8-956d0818e9da Content-Type: text/plain; charset=utf-8 Content-Disposition: form-data; name=api_user
HIDDEN --5d906b49-b109-4796-b3d8-956d0818e9da Content-Type: text/plain; charset=utf-8 Content-Disposition: form-data; name=api_key
HIDDEN --5d906b49-b109-4796-b3d8-956d0818e9da Content-Type: text/plain; charset=utf-8 Content-Disposition: form-data; name=from
sales@acutesales.co.uk --5d906b49-b109-4796-b3d8-956d0818e9da Content-Type: text/plain; charset=utf-8 Content-Disposition: form-data; name=subject
Acutest Direct - New Quotation --5d906b49-b109-4796-b3d8-956d0818e9da Content-Type: text/plain; charset=utf-8 Content-Disposition: form-data; name=html
Hello Craig Williams,
Please find attached your quotation.
To view datasheets regarding products quoted for please use the links below:
PROMO MACROTOUCH Multifunction Tester - Introductory Price
generalcaw@gmail.com --5d906b49-b109-4796-b3d8-956d0818e9da Content-Type: text/plain; charset=utf-8 Content-Disposition: form-data; name="bcc[]"
richard.guthrie@acutesales.co.uk --5d906b49-b109-4796-b3d8-956d0818e9da Content-Type: text/plain; charset=utf-8 Content-Disposition: form-data; name="bcc[]"
sales@acutesales.co.uk --5d906b49-b109-4796-b3d8-956d0818e9da Content-Type: text/plain; charset=utf-8 Content-Disposition: form-data; name="bcc[]"
craig.williams@acutesales.co.uk --5d906b49-b109-4796-b3d8-956d0818e9da Content-Type: text/plain; charset=utf-8 Content-Disposition: form-data; name="bcc[]"
web@acutesales.co.uk --5d906b49-b109-4796-b3d8-956d0818e9da Content-Disposition: form-data; name="files[Quotation_08011526RG.pdf]"; filename=Quotation_08011526RG.pdf Content-Type: application/octet-stream
%PDF-1.4
%
1 0 obj
<<
/Pages 2 0 R
/Outlines 3 0 R
/PageLayout /OneColumn
/Type /Catalog
/OutputIntents [<<
/OutputCondition ()
/OutputConditionIdentifier (Custom)
/RegistryName ()
/Info (sRGB IEC61966-2.1)
/Type /OutputIntent
/DestOutputProfile 4 0 R
/S /GTS_PDFA1
] /ViewerPreferences 5 0 R /PageMode /UseNone
endobj 2 0 obj << /Count 1 /Kids [6 0 R] /Type /Pages
endobj 6 0 obj << /Resources << /ProcSet [/PDF /Text /ImageC] /XObject << /EvoPdf_ggkohaidjdjjkhanolabafcplngdmagl 7 0 R /EvoPdf_flpcjlplcpdmkichoihckefffiifajac 8 0 R /EvoPdf_laddmnbpokikkpfkpibbophkmjpjdnnc 9 0 R
/Parent 2 0 R /MediaBox [0.00000 0.00000 595.00000 842.00000] /Annots [10 0 R] /Type /Page /Contents [11 0 R 12 0 R]
endobj 11 0 obj << /Filter /FlateDecode /Length 136
stream x^M ; 0D{K Þ lB=T ljH a#o N |m 3H[ k D " H 7 ~ U .`+JTK V N~ >nއ r (ϔ R SX c 8;s e0 endstream
endobj 12 0 obj << /Filter /FlateDecode /Length 151
stream x^ ; 0D{K Þ
That's very strange. It looks like the post body is fine. Next thing I can suggest is going to https://sendgrid.com/logs/index and seeing if the to and bcc emails are being shown there.
nb: you might want to modify that comment as it has links to pdf documents that might be private. as well as the customers email address.
Hi @0xdeafcafe, Thanks for your help so far, it looks like my bcc emails are bouncing:
email: craig.williams@acutesales.co.uk
type: bounce
reason: 554 5.7.1 Command rejected
smtp-id: 14acb2d0f10.34bf.3abd6a@ismtpd-033
processed string: January 8, 2015 - 08:12:23 PM
is this something for sendgrid support, or could the command being sent through from the API be incorrect somewhere?
Thanks.
If you open a ticket here https://support.sendgrid.com/hc/en-us/requests/new detailing the bounce, the SendGrid support team will look into it. Anything else you could suggest @brandonmwest?
Thank you so much @0xdeafcafe you've been a great help. I will raise a ticket and keep you informed.
Hi guys,
It looks like there is a spam filter that the IT Support People here didn't know existed, and has been blocking Emails sent from sendgrid.
Its what i'm up against everyday with my job here, spending hours and being told its not our fault only to prove its there fault. In my opinion, they should have an audit log on all systems and changes to those systems. Similar to how GIT handles my code changes, and what i put in place on the admin side of my websites to track who changes what.
Thank you guys a lot especially @0xdeafcafe.
@craig-acutest Glad you got it sorted out! Thanks @0xdeafcafe
Anytime @craig-acutest! Glad you got it sorted 💃
Here is code I'm using to add a Blind carbon copy:
mail.AddBcc(staff.Email);
Where 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.
We have recently moved our websites to Microsoft Azure, and investigated this as being the best solution to send emails.
We 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.
Please can you show me why this isn't working? or if this is a bug i have found, can it be fixed?
Thanks,
Craig.
Full code of function below: