C# Class Smrf.NodeXL.ExcelTemplate.EmailExporter

Exports a graph to one or more email recipients.
Call ExportToEmail to export a graph to one or more email recipients.
Inheritance: Object
Show file Open project: 2014-sed-team3/term-project

Public Methods

Method Description
EmailExporter ( ) : System

Initializes a new instance of the EmailExporter class.

ExportToEmail ( Microsoft workbook, NodeXLControl nodeXLControl, String toAddresses, String fromAddress, String subject, String messageBody, String smtpHost, Int32 smtpPort, System.Boolean useSslForSmtp, String smtpUserName, String smtpPassword, System.Boolean exportWorkbookAndSettings, System.Boolean exportGraphML, System.Boolean useFixedAspectRatio ) : void

Protected Methods

Method Description
AddAlternateHtml ( MailMessage oMailMessage, Byte abtFullSizeImage ) : void
AddAttachment ( MailMessage oMailMessage, Byte abtAttachmentContents, String sContentType, String sSuggestedFileNameNoExtension, String sSuggestedExtension ) : void
AddAttachment ( MailMessage oMailMessage, String sAttachmentContents, String sContentType, String sSuggestedFileNameNoExtension, String sSuggestedExtension ) : void
AddAttachments ( MailMessage oMailMessage, String sSuggestedFileNameNoExtension, String sGraphMLFileNameNoExtension, Byte abtFullSizeImage, Byte abtWorkbookContents, String sWorkbookSettings, Byte abtGraphMLZipped ) : void
AddAttachmentsAndAlternateHtml ( MailMessage oMailMessage, Microsoft oWorkbook, NodeXLControl oNodeXLControl, System.Boolean bExportWorkbookAndSettings, System.Boolean bExportGraphML, System.Boolean bUseFixedAspectRatio ) : void
AddLinkedResourceForFullSizeImage ( Byte abtFullSizeImage, System.Net.Mail.AlternateView oHtmlView ) : void
GetMailMessage ( Microsoft oWorkbook, NodeXLControl oNodeXLControl, String asToAddresses, String sFromAddress, String sSubject, String sMessageBody, System.Boolean bExportWorkbookAndSettings, System.Boolean bExportGraphML, System.Boolean bUseFixedAspectRatio ) : MailMessage
GetSmtpClient ( String sSmtpHost, Int32 iSmtpPort, System.Boolean bUseSslForSmtp, String sSmtpUserName, String sSmtpPassword ) : SmtpClient
GetSuggestedFileNameNoExtension ( Microsoft oWorkbook ) : String
ReplaceGraphSummaryMacro ( String sMessageBody, Microsoft oWorkbook ) : String
SetAddresses ( MailMessage oMailMessage, String asToAddresses, String sFromAddress ) : void
TryReplaceGraphImageMacro ( String &sMessageBody ) : System.Boolean

Private Methods

Method Description
AssertValid ( ) : void

Method Details

AddAlternateHtml() protected method

protected AddAlternateHtml ( MailMessage oMailMessage, Byte abtFullSizeImage ) : void
oMailMessage System.Net.Mail.MailMessage
abtFullSizeImage Byte
return void

AddAttachment() protected method

protected AddAttachment ( MailMessage oMailMessage, Byte abtAttachmentContents, String sContentType, String sSuggestedFileNameNoExtension, String sSuggestedExtension ) : void
oMailMessage System.Net.Mail.MailMessage
abtAttachmentContents Byte
sContentType String
sSuggestedFileNameNoExtension String
sSuggestedExtension String
return void

AddAttachment() protected method

protected AddAttachment ( MailMessage oMailMessage, String sAttachmentContents, String sContentType, String sSuggestedFileNameNoExtension, String sSuggestedExtension ) : void
oMailMessage System.Net.Mail.MailMessage
sAttachmentContents String
sContentType String
sSuggestedFileNameNoExtension String
sSuggestedExtension String
return void

AddAttachments() protected method

protected AddAttachments ( MailMessage oMailMessage, String sSuggestedFileNameNoExtension, String sGraphMLFileNameNoExtension, Byte abtFullSizeImage, Byte abtWorkbookContents, String sWorkbookSettings, Byte abtGraphMLZipped ) : void
oMailMessage System.Net.Mail.MailMessage
sSuggestedFileNameNoExtension String
sGraphMLFileNameNoExtension String
abtFullSizeImage Byte
abtWorkbookContents Byte
sWorkbookSettings String
abtGraphMLZipped Byte
return void

AddAttachmentsAndAlternateHtml() protected method

protected AddAttachmentsAndAlternateHtml ( MailMessage oMailMessage, Microsoft oWorkbook, NodeXLControl oNodeXLControl, System.Boolean bExportWorkbookAndSettings, System.Boolean bExportGraphML, System.Boolean bUseFixedAspectRatio ) : void
oMailMessage System.Net.Mail.MailMessage
oWorkbook Microsoft
oNodeXLControl Smrf.NodeXL.Visualization.Wpf.NodeXLControl
bExportWorkbookAndSettings System.Boolean
bExportGraphML System.Boolean
bUseFixedAspectRatio System.Boolean
return void

AddLinkedResourceForFullSizeImage() protected method

protected AddLinkedResourceForFullSizeImage ( Byte abtFullSizeImage, System.Net.Mail.AlternateView oHtmlView ) : void
abtFullSizeImage Byte
oHtmlView System.Net.Mail.AlternateView
return void

EmailExporter() public method

Initializes a new instance of the EmailExporter class.
public EmailExporter ( ) : System
return System

ExportToEmail() public method

public ExportToEmail ( Microsoft workbook, NodeXLControl nodeXLControl, String toAddresses, String fromAddress, String subject, String messageBody, String smtpHost, Int32 smtpPort, System.Boolean useSslForSmtp, String smtpUserName, String smtpPassword, System.Boolean exportWorkbookAndSettings, System.Boolean exportGraphML, System.Boolean useFixedAspectRatio ) : void
workbook Microsoft
nodeXLControl Smrf.NodeXL.Visualization.Wpf.NodeXLControl
toAddresses String
fromAddress String
subject String
messageBody String
smtpHost String
smtpPort System.Int32
useSslForSmtp System.Boolean
smtpUserName String
smtpPassword String
exportWorkbookAndSettings System.Boolean
exportGraphML System.Boolean
useFixedAspectRatio System.Boolean
return void

GetMailMessage() protected method

protected GetMailMessage ( Microsoft oWorkbook, NodeXLControl oNodeXLControl, String asToAddresses, String sFromAddress, String sSubject, String sMessageBody, System.Boolean bExportWorkbookAndSettings, System.Boolean bExportGraphML, System.Boolean bUseFixedAspectRatio ) : MailMessage
oWorkbook Microsoft
oNodeXLControl Smrf.NodeXL.Visualization.Wpf.NodeXLControl
asToAddresses String
sFromAddress String
sSubject String
sMessageBody String
bExportWorkbookAndSettings System.Boolean
bExportGraphML System.Boolean
bUseFixedAspectRatio System.Boolean
return System.Net.Mail.MailMessage

GetSmtpClient() protected method

protected GetSmtpClient ( String sSmtpHost, Int32 iSmtpPort, System.Boolean bUseSslForSmtp, String sSmtpUserName, String sSmtpPassword ) : SmtpClient
sSmtpHost String
iSmtpPort System.Int32
bUseSslForSmtp System.Boolean
sSmtpUserName String
sSmtpPassword String
return System.Net.Mail.SmtpClient

GetSuggestedFileNameNoExtension() protected method

protected GetSuggestedFileNameNoExtension ( Microsoft oWorkbook ) : String
oWorkbook Microsoft
return String

ReplaceGraphSummaryMacro() protected method

protected ReplaceGraphSummaryMacro ( String sMessageBody, Microsoft oWorkbook ) : String
sMessageBody String
oWorkbook Microsoft
return String

SetAddresses() protected method

protected SetAddresses ( MailMessage oMailMessage, String asToAddresses, String sFromAddress ) : void
oMailMessage System.Net.Mail.MailMessage
asToAddresses String
sFromAddress String
return void

TryReplaceGraphImageMacro() protected method

protected TryReplaceGraphImageMacro ( String &sMessageBody ) : System.Boolean
sMessageBody String
return System.Boolean