symfony API

sfMailer Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.3 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.3 version. Switch to:

sfMailer is the main entry point for the mailer system.

Method Summary

Method Details

  • (Swift_Message) compose ($from, $to, $subject, $body) Browse code

    $from The from address
    $to The recipient(s)
    $subject The subject
    $body The body

    Creates a new message.

    returns A Swift_Message instance

  • (int) composeAndSend ($from, $to, $subject, $body) Browse code

    $from The from address
    $to The recipient(s)
    $subject The subject
    $body The body

    Sends a message.

    returns The number of sent emails

  • (int) flushQueue () Browse code

    Sends the current messages in the spool.


    The return value is the number of recipients who were accepted for delivery.

    returns The number of sent emails

  • (string) getDeliveryAddress () Browse code

    Gets the delivery address.

    returns The delivery address

  • (string) getDeliveryStrategy () Browse code

    Gets the delivery strategy.

    returns The delivery strategy

  • (sfMailerMessageLoggerPlugin) getLogger () Browse code

    Gets the logger instance.

    returns The logger instance.

  • (Swift_Transport) getRealtimeTransport () Browse code

    Gets the realtime transport instance.

    returns The realtime transport instance.

  • getSpool () Browse code

  • initialize () Browse code

  • (int|false) send ($transport, ) Browse code

    $transport A transport instance

    Sends the given message.

    returns The number of sent emails

  • (sfMailer) sendNextImmediately () Browse code

    Forces the next call to send() to use the realtime strategy.

    returns The current sfMailer instance

  • setDeliveryAddress ($address) Browse code

    $address The delivery address

    Sets the delivery address.

  • setLogger ($logger) Browse code

    $logger The logger instance.

    Sets the logger instance.

  • setRealtimeTransport ($transport) Browse code

    $transport The realtime transport instance.

    Sets the realtime transport instance.

  • __construct ($dispatcher, $options) Browse code

    $dispatcher An event dispatcher instance
    $options An array of options

    Constructor.


    Available options:

    * charset: The default charset to use for messages
    * logging: Whether to enable logging or not
    * delivery_strategy: The delivery strategy to use
    * spool_class: The spool class (for the spool strategy)
    * spool_arguments: The arguments to pass to the spool constructor
    * delivery_address: The email address to use for the single_address strategy
    * transport: The main transport configuration
    * * class: The main transport class
    * * param: The main transport parameters