7

So, what I am doing is I am using Sendgdrid's API (PHP API Library) to send e-mails. The sending part works, I just want to overhaul it a little to add some more customization, but I am not sure if it's possible. I am using CodeIgniter so I am skipping some code, but you get the general idea.

What I want to achieve is to customize this part

Example of what I want to modify

I want the company logo to appear there instead of the automatically generated A.

I want to achieve this:

enter image description here

Is there some header I need to modify?

My mail sending process is this (fictional data):

$email = new \SendGrid\Mail\Mail(); 
$email->setFrom("[email protected]", "Sender Name");
$email->setSubject("Mail Subject");
$email->addTo($mail_data->email, $mail_data->name);
$email->addContent(
    "text/html", $this->load->view('mails/recovery', $mail_data, TRUE)
);

$sendgrid = new \SendGrid($this->config->item('sendgrid_api_key'));

try {
    $response = $sendgrid->send($email);
    // do some stuff
} catch (Exception $e) {
    // do some other stuff
}

So the mail arrives correct and everything, but is there a way to add like an avatar for the mail sender? Like the company's logo or something. Is there a way to do this via code?

I checked something about creating a google account, but what if I am using a noreply@ address and also what happens if for another mail I use a different address? I'd have to add google accounts to each one?

10
  • 1
    stackoverflow.com/questions/43091844/…
    – Rotimi
    Commented Mar 18, 2020 at 18:54
  • @Akintunde-Rotimi I checked that but I am not sure that's the only way to do this, moreover when a noreply@ address is used. Isn't there a way to customize this? Commented Mar 18, 2020 at 18:59
  • 3
    The image is associated with the account. It isn't sent in the email. Commented Mar 18, 2020 at 19:00
  • So, what happens if the account doesn't exist? Or do I need to create an account and disable its inbox? Commented Mar 18, 2020 at 19:09
  • Just as an additional question. What happens if there's already G-Suite enabled for that domain, is there a way to do this without creating another e-mail? It would cost $6 USD a month just to do that. Commented Mar 18, 2020 at 19:16

1 Answer 1

2

So, based on Matthew Setter's comment on my question, I researched a little bit and the solution to this is the BIMI DNS record. BIMI stands for Brand Indicators for Message Identification

It requires the following:

  1. You need an SVG version of your icon/logo/pic and the max weight of the image must be 32kb. The image must be publicly accessible, so it must be something like https://www.yourdomain.com/images/icon.svg

  2. You need a BIMI Certificate, that's the tricky part, because they are currently extremely expensive, Digicert sells them as Verified Mark Certificate and they cost $1,499.00 USD per year, so it won't do for most people. You also need to host the certificate also on your domain on a public link, something like https://www.yourdomain.com/cert/bimi.pem

  3. You need to have a defined DMARC policy, if you don't have one it might show warnings/errors.

  4. You need to add a TXT record with the following structure

    1. The name of the record is: default._bimi

    2. v (version) BIMI1: v=BIMI1;

    3. l (location) of the SVG image: https://www.yourdomain.com/images/icon.svg

    4. a (address I think) of your certificate: https://www.yourdomain.com/cert/bimi.pem

So the end result is something like this:

TXT default._bimi "v=BIMI1;l=https://www.yourdomain.com/images/icon.svg;a=https://www.yourdomain.com/cert/bimi.pem" 3600

I hope the certificate authorities reduce the price of this as it can be useful for many businesses but $1,499.00 for a certificate is way too much for the regular business owner.

OTHER RESOURCES

You can also use these tools to generate/validate BIMI records.

1
  • 1
    Found a slightly cheaper option at Entrust for $1,299 a year. You also need to have a registered trademark for your logo (from an official intellectual property office) Commented Jan 19 at 13:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.