Beispiel #1
0
        /// <summary>
        /// Upload Attachment to JangoMail using a Memory Stream.
        /// </summary>
        /// <param name="username">Your JangoMail Username</param>
        /// <param name="password">Your JangoMail Password</param>
        /// <param name="stream">MemoryStream object</param>
        /// <param name="targetFilename">Name of file to store with JangoMail</param>
        /// <param name="overwriteExistingFile">If yes, overwrites the file if it already exists</param>
        /// <returns>String representing API response</returns>
        public static string UploadAttachmentFromMemoryStream(string username, string password, MemoryStream stream, string targetFilename, bool overwriteExistingFile)
        {
            JangoMailService.JangoMailSoapClient client = new JangoMailService.JangoMailSoapClient("JangoMailSoap");

            string response = client.UploadAttachment(
                username,
                password,
                stream.GetBuffer(),
                targetFilename,
                true);

            return(response);
        }
Beispiel #2
0
        /// <summary>
        /// Sample code to execute SendTransactionalEmail method
        /// </summary>
        static void Main(string[] args)
        {
            JangoMailService.JangoMailSoapClient client = new JangoMailService.JangoMailSoapClient("JangoMailSoap");

            string response = client.SendTransactionalEmail(
                "Username",
                "Password",
                "FromEmail",
                "FromName",
                "ToEmailAddress",
                "Subject",
                "MessagePlain",
                "MessageHTML",
                "Options");

            Console.WriteLine(response);

            Console.ReadKey();
        }