Closed MattiSG closed 7 years ago
What specifically are you seeing that suggests to you that something is being interpreted as Markdown ? Where is that Markdown processor running ?
What specifically are you seeing that suggests to you that something is being interpreted as Markdown?
Plus, I get an HTML part when I look at the raw email…
Where is that Markdown processor running?
This, my friend, I don't pretend to know… On the service provider (Sendgrid)'s end, I guess?
Thanks, that narrows down the hypothesis to test considerably. My plan is to run a test by manually sending some markdown via Sendgrid.
I sent myself an email using the following procedure:
> heroku run irb
irb> lib = File.expand_path('../lib', __FILE__)
irb> $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
irb> require 'betagouvbot'
irb> mailer = BetaGouvBot::Mailer
irb> envelope = (a json string)
irb> body = "[this is a link](http://localhost)"
irb> email = mailer.format_email(body,envelope,{})
irb> mailer.client.post(request_body: email)
In the email I received, the link code was not interpreted.
So SendGrid is in fact post-processing the text of emails sent via Mailer (in particular by adding tracking wrappers to link targets, which bothers me quite a bit), but this processor is not a Markdown parser.
The emails I receive are in HTML, and the text source is definitely interpreted as Markdown.
I don't know how to test this though.