You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usingSystem;usingSystem.Collections.Generic;usingSystem.Globalization;usingSystem.Threading.Tasks;usingPepipost;usingPepipost.Utilities;usingPepipost.Models;usingPepipost.Controllers;usingPepipost.Exceptions;usingSystem.IO;namespaceTesting{classProgram{staticvoidMain(string[]args){Configuration.ApiKey="api_key";PepipostClientclient=newPepipostClient();MailSendControllermailSend=client.MailSend;Sendbody=newSend();body.From=newFrom();body.From.Email="hello@your-registered-domain-with-pepipost";body.From.Name="Pepipost";body.Subject="Pepipost Test Mail from SDK";body.Content=newList<Content>();Contentbody_content_0=newContent();body_content_0.Type=TypeEnum.HTML;body_content_0.Value="<html><body>Hello, Welcome to Pepipost Family.<br>My name is [% name %].<br>my love is sending [% love %]</body> <br></html>";body.Content.Add(body_content_0);body.Personalizations=newList<Personalizations>();Personalizationsbody_personalizations_0=newPersonalizations();body_personalizations_0.Attributes=APIHelper.JsonDeserialize<Object>("{\"name\":\"Pepi\",\"love\":\"Email\"}");body_personalizations_0.To=newList<EmailStruct>();EmailStructbody_personalizations_0_to_0=newEmailStruct();body_personalizations_0_to_0.Name="to-address";body_personalizations_0_to_0.Email="to-address@mydomain.name";body_personalizations_0.To.Add(body_personalizations_0_to_0);body_personalizations_0.Cc=newList<EmailStruct>();EmailStructbody_personalizations_0_cc_0=newEmailStruct();body_personalizations_0_cc_0.Name="to-cc-name";body_personalizations_0_cc_0.Email="to-bcc-name";body_personalizations_0.Cc.Add(body_personalizations_0_cc_0);body_personalizations_0.Bcc=newList<EmailStruct>();EmailStructbody_personalizations_0_bcc_0=newEmailStruct();body_personalizations_0_bcc_0.Name="to-bcc-name";body_personalizations_0_bcc_0.Email="to-bcc-name@mydomain.name";body_personalizations_0.Bcc.Add(body_personalizations_0_bcc_0);body.Personalizations.Add(body_personalizations_0);body.Settings=newSettings();body.Settings.Footer=true;body.Settings.ClickTrack=true;body.Settings.OpenTrack=true;body.Settings.UnsubscribeTrack=true;try{objectresult=mailSend.CreateGeneratethemailsendrequestAsync(body).Result;}catch(APIExceptione){};}}}