Class MailBox
- Namespace
- SunamoMail
- Assembly
- SunamoMail.dll
Static mailbox wrapper for sending emails via Google Apps mailbox.
public class MailBox
- Inheritance
-
MailBox
- Inherited Members
- Extension Methods
Properties
Mailbox
Gets or sets the shared Google Apps mailbox instance.
public static GoogleAppsMailbox? Mailbox { get; set; }
Property Value
Methods
SendEmail(string, string, string, bool, string, string, params string[])
Sends an email using the first recipient address as reply-to.
public static string SendEmail(string to, string cc, string bcc, bool isUsingFirstRecipientAsReplyTo, string subject, string htmlBody, params string[] attachments)
Parameters
tostringRecipient email address(es), semicolon-separated for multiple.
ccstringCarbon copy email address(es), semicolon-separated for multiple.
bccstringBlind carbon copy email address(es), semicolon-separated for multiple.
isUsingFirstRecipientAsReplyToboolWhether to use the first recipient as the reply-to address.
subjectstringEmail subject line.
htmlBodystringHTML-formatted email body content.
attachmentsstring[]Optional file paths to attach to the email.
Returns
- string
Returns "success" on successful send, or "error: [message]" on failure.
SendEmail(string, string, string, string, string, string, params string[])
Sends an HTML email with explicit reply-to address.
public static string SendEmail(string to, string cc, string bcc, string replyTo, string subject, string htmlBody, params string[] attachments)
Parameters
tostringRecipient email address(es), semicolon-separated for multiple.
ccstringCarbon copy email address(es), semicolon-separated for multiple.
bccstringBlind carbon copy email address(es), semicolon-separated for multiple.
replyTostringReply-to email address, or empty string to use the from address.
subjectstringEmail subject line.
htmlBodystringHTML-formatted email body content.
attachmentsstring[]Optional file paths to attach to the email.
Returns
- string
Returns "success" on successful send, or "error: [message]" on failure.