I have job that saves email receiver, sender, email subject and email body to database which by then sends
by another job.
by another job.
I need to attach emoji along with subject text.
I need to attach pizza emoji with my subject how do i do it? (code for emoji is U+1F355 in https://emojipedia.org/runner/ )
Istudent RanaPosted Sep 6, 2019, 3:25 PM
byte[] utf8Bytes = Encoding.UTF8.GetBytes(pizzaEmoji);
{
msg.From = new MailAddress("[email protected]");
msg.To.Add("[email protected]");
msg.Subject = "Test";
msg.Body = "Test";
msg.IsBodyHtml = true;
msg.BodyEncoding = Encoding.UTF8;
msg.Subject = "test message " + Encoding.UTF8.GetString(utf8Bytes);
msg.SubjectEncoding = Encoding.UTF8;
using (SmtpClient smtp = new SmtpClient(host))
{
smtp.Send(msg);
}
}
Amit GuptaPosted Sep 6, 2019, 3:08 PM
Istudent RanaPosted Sep 6, 2019, 2:42 PM
Amit GuptaPosted Sep 6, 2019, 2:04 PM