DotNetCore/Answer Detail

How can set name for from email?

kikme
kikme
8 Points
4 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?

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

Share:   fb twitter linkedin
Answers
Rahul Maurya
Rahul M...
Moderator
1152 Points
211 Posts
     

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

emailModel.From = "Example <example@exampleniceone.com>";

And other source code will be same.

Posted On: 07-Aug-2018 01:43
banner

Blog

Active User (9)

 Log In to Chat