public void SendEmail( String subject, BodyParts bodyParts, List<String> recipients, List<String> attachments, AsyncCallback<object> responder ) { if( subject == null ) throw new ArgumentNullException( ExceptionMessage.NULL_SUBJECT ); if( bodyParts == null ) throw new ArgumentNullException( ExceptionMessage.NULL_BODYPARTS ); if( recipients == null || recipients.Count == 0 ) throw new ArgumentNullException( ExceptionMessage.NULL_RECIPIENTS ); if( attachments == null ) throw new ArgumentNullException( ExceptionMessage.NULL_ATTACHMENTS ); Invoker.InvokeAsync( EMAIL_MANAGER_SERVER_ALIAS, "send", new Object[] { Backendless.AppId, Backendless.VersionNum, subject, bodyParts, recipients, attachments }, responder ); }
public void SendEmail( String subject, BodyParts bodyParts, String recipient, AsyncCallback<object> responder ) { SendEmail( subject, bodyParts, new List<String>() { recipient }, new List<String>(), responder ); }
public void SendEmail( String subject, BodyParts bodyParts, String recipient, List<String> attachments ) { SendEmail( subject, bodyParts, new List<String>() { recipient }, attachments ); }
public void SendEmail( String subject, BodyParts bodyParts, String recipient ) { SendEmail( subject, bodyParts, new List<String>() { recipient }, new List<String>() ); }
public void SendEmail(String subject, BodyParts bodyParts, List<String> recipients, List<String> attachments, AsyncCallback<object> responder) { if (subject == null) throw new ArgumentNullException(ExceptionMessage.NULL_SUBJECT); if (bodyParts == null) throw new ArgumentNullException(ExceptionMessage.NULL_BODYPARTS); if (recipients == null || recipients.Count == 0) throw new ArgumentNullException(ExceptionMessage.NULL_RECIPIENTS); if (attachments == null) throw new ArgumentNullException(ExceptionMessage.NULL_ATTACHMENTS); Dictionary<string, object> requestData = new Dictionary<string, object>(); requestData.Add("subject", subject); requestData.Add("bodyparts", bodyParts); if (recipients.Count > 0) requestData.Add("to", recipients); if (attachments.Count > 0) requestData.Add("attachment", attachments); Invoker.InvokeAsync(Invoker.Api.MESSAGINGSERVICE_SENDEMAIL, new Object[] { requestData }, responder); }