Sendgrid email from name instead of email address

Hi,

I am trying to send out emails using Sendgrid referring to these docs - https://docs.moralis.io/moralis-server/tools/sending-email

Currently, when the email is sent out, it shows only the email address (even though I have set up the from name field in Sendgrid and tried adding it to the object being passed to Moralis.Cloud.sendEmail following this: https://stackoverflow.com/questions/16755545/adding-a-name-to-the-from-field-in-sendgrid-in-node-js )

Is there a way to show the from name field in the email? So for example something like this -
Moralis Forum < [email protected]>

1 Like

I tested two options now and it doesn’t work for me either.
I don’t know if it is possible to do that now.

It’s been a good while, and we really would love to be able to use a fromname so our email look less fishy coming in the user’s mailbox.

So to add a fromname field to the Moralis Email Settings and Sendgrid API.

$params = array(
    'api_user' => $user,
    'api_key' => $pass,
    'to'        => $to,
    'from' => '<moralis_email_settings_from_email>',
    'fromname' => ‘<moralis_email_settings_from_name>’,
    'subject' => $subject,
    'html' => $body,
);

Since it’s not related to the SDK, I can do a feature request there.
If you don’t plan to support this, we would have to write our own connection to the API and verification email cloud functions.