How can set name for from email?

38 Points
14 Posts

I'm using amazon AWSSDK.SimpleEmail email service to send email. I want to set the name as well as email address in the from email address.

var message = new Message(subject, body);
var request = new SendEmailRequest(emailModel.From, to, message);
var client = GenerateClient();
var result = await client.SendEmailAsync(request);

Here SendEmailRequest has only source parameter

public SendEmailRequest(string source, Destination destination, Message message);

How we can set the name?

Views: 9129
Total Answered: 1
Total Marked As Answer: 0
Posted On: 06-Aug-2018 00:18

Share:   fb twitter linkedin
Rahul Maurya
Rahul M...
1402 Points
236 Posts

Pass 'from email name' and 'email address' in source parameter as:

emailModel.From = "Example <>";

And other source code will be same.

Posted On: 07-Aug-2018 01:43
 Log In to Chat