Skip to content

Instantly share code, notes, and snippets.

@VibhuKuchhal
Last active August 21, 2020 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VibhuKuchhal/6967fa5e938c6dc339c5 to your computer and use it in GitHub Desktop.
Save VibhuKuchhal/6967fa5e938c6dc339c5 to your computer and use it in GitHub Desktop.
public class TempMail
{
public string Subject { get; set; }
public string Body { get; set; }
public List<string> Recipients { get; set; }
public bool IsSummary { get; set; }
}
//Mapping Logic
TempMail mail = new TempMail();
mail.Body = message.Body.Text;
mail.Subject = message.Subject.
Substring(message.Subject.
IndexOf(ConfigurationManager.AppSettings["ValidEmailIdentifier"].ToString()) + 1).Trim();
mail.Info = " Sender: " + message.Sender.Name +
" Sender EmailId: " + message.Sender.Address +
" Subject: " + mail.Subject;
string body = message.Body.Text;
//Get the mail Ids the mail is to be broacasted to
mail.Recipients = new List<string>();
for (int i = 0; i < 50; i++)
{
mail.Recipients.Add("vibhu.kuchhal" + i.ToString() + "@contoso.com");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment