示例#1
0
        /// <summary>
        /// Write the attachment to the file path.
        /// </summary>
        /// <param name="directoryPath">The directory path to write the file.</param>
        /// <param name="fileName">The name of the file to write.</param>
        /// <returns>True if the attachment was written else false.</returns>
        public bool WriteAttachment(string directoryPath, string fileName)
        {
            try
            {
                // Write the current attachment
                // to the specified file.
                EmailMessageParse.WriteAttachment(_file,
                                                  directoryPath, fileName);

                return(true);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }