coldbox.system.core.mail

Class MailService

WEB-INF.cftags.component
        extended by coldbox.system.core.mail.MailService
Class Attributes:
  • output : false
  •  
    Direct Known Subclasses:
    MailService

    The ColdBox Mail Service used to send emails in an oo and ColdBoxy fashion

    Constructor Summary
    init([any<MailSettingsBean> mailSettings], [any tokenMarker='@'])
          Constructor.
    Method Summary
    any<MailSettingsBean> getMailSettingsBean()
         Get the mail settings configuration object.
    string getTokenMarker()
         Get the token marker to use for body token replacements.
    any<Mail> newMail()
         Get a new Mail payload object, just use config() on it to prepare it or pass in all the arguments via this method.
    private void parseTokens(any<Mail> mail)
         Parse the tokens and do body replacements.
    struct send(any<Mail> mail)
         Send an email payload.
    void setTokenMarker(any tokenMarker)
         Set the token marker to use for body token replacements.
     
    Methods inherited from class WEB-INF.cftags.component
    None

    Constructor Detail

    init

    public init([any<MailSettingsBean> mailSettings], [any tokenMarker='@'])

    Constructor

    Parameters:
    mailSettings - A configured mail settings bean with default mail configurations, else ignored and uses payload
    tokenMarker - The default token Marker Symbol

    Method Detail

    getMailSettingsBean

    public any<MailSettingsBean> getMailSettingsBean()

    Get the mail settings configuration object


    getTokenMarker

    public string getTokenMarker()

    Get the token marker to use for body token replacements


    newMail

    public any<Mail> newMail()

    Get a new Mail payload object, just use config() on it to prepare it or pass in all the arguments via this method


    parseTokens

    private void parseTokens(any<Mail> mail)

    Parse the tokens and do body replacements.

    Parameters:
    mail - The mail payload

    send

    public struct send(any<Mail> mail)

    Send an email payload. Returns a struct: [error:boolean,errorArray:array]

    Parameters:
    mail - The mail payload to send.

    setTokenMarker

    public void setTokenMarker(any tokenMarker)

    Set the token marker to use for body token replacements

    Parameters:
    tokenMarker