Dart.Mail Namespace > MailMessage Class : ReplyInline Method |
Public Function ReplyInline( _ ByVal from As String, _ ByVal textReply As String, _ ByVal textSeparator As String, _ ByVal htmlReply As String, _ ByVal htmlSeparator As String _ ) As MailMessage
Dim instance As MailMessage Dim from As String Dim textReply As String Dim textSeparator As String Dim htmlReply As String Dim htmlSeparator As String Dim value As MailMessage value = instance.ReplyInline(from, textReply, textSeparator, htmlReply, htmlSeparator)
public MailMessage ReplyInline( string from, string textReply, string textSeparator, string htmlReply, string htmlSeparator )
public: MailMessage* ReplyInline( string* from, string* textReply, string* textSeparator, string* htmlReply, string* htmlSeparator )
public: MailMessage^ ReplyInline( String^ from, String^ textReply, String^ textSeparator, String^ htmlReply, String^ htmlSeparator )
Exception | Description |
---|---|
System.FormatException | Indicates a from or to address is not properly formatted. |
Can be used to create a UI-centric reply message (use empty strings for textReply and htmlReply). To create a reply that leaves the original parts unmodified, use Reply.
The MailMessage is cloned and the 'textReply' and 'textSeparator' arguments are prepended to MailMessage.Text, separated by System.Environment.NewLine. If the original MailMessage.Html is populated, it is wrapped in a blockquote tag, and the 'htmlReply' and 'htmlSeparator' arguments are prepended to it, separated by line break tags. If the original MailMessage.Html is not populated, it is set to the 'htmlReply' and 'htmlSeparator' arguments, separated by line break tags (if they are specified). The new message is addressed to the "Reply-To" or "From:" header field found in the original message ("Reply-To" supersedes "From:). "Re: " is prepended to the Subject.
This method modifies the original message. Use ReplyAllInline to reply to all recipients. Use Forward to forward a message.
The returned message can be modified to change any default values.
/// <summary> /// Generates the common reply separator. /// </summary> /// <param name="message">The message that is being replied to.</param> /// <returns>A reply separator that can be used for the *Separator arguments of MailMessage.ReplyInline() or ReplyAllInline().</returns> public string GenerateReplySeparator(MailMessage message) { return "On " + message.Date.ToString() + ", " + message.From + " wrote:"; }
''' <summary> ''' Generates the common reply separator. ''' </summary> ''' <param name="message">The message that is being replied to.</param> ''' <returns>A reply separator that can be used for the *Separator arguments of MailMessage.ReplyInline() or ReplyAllInline().</returns> Public Function GenerateReplySeparator(ByVal message As MailMessage) As String Return "On " & message.Date.ToString() & ", " & message.From & " wrote:" End Function