private static string ConstructMessage(Xby2Message xby2Message) { return ("First Name: " + xby2Message.FirstName + "\n" + "Last Name: " + xby2Message.LastName + "\n" + "Email: " + xby2Message.Email + "\n" + "Phone: " + xby2Message.PhoneNumber + "\n" + "Message: " + xby2Message.Message); }
public static MailjetMessage FromXby2Message(Xby2Message xby2Message, string fromEmail, string toEmail, string subject) { return(new MailjetMessage( new MailjetEmailUser(fromEmail), new MailjetEmailUser[] { new MailjetEmailUser(toEmail) }, subject, ConstructMessage(xby2Message) )); }