Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sendgrid php example - how to add sender's name?

Tags:

php

sendgrid

In the sendgrid php example here http://sendgrid.com/docs/Code_Examples/php.html you have the ability to add sender's email but not the sender's name. So say for example if the name of the sender is assigned variable $name, how can I properly add it to the example so that the sender's name is shown as, for example, Bob rather than just [email protected]?

Thanks!

like image 778
AZhu Avatar asked Dec 26 '22 09:12

AZhu


1 Answers

Turns out the answer is

setFromName($name)
like image 115
AZhu Avatar answered Dec 28 '22 23:12

AZhu