blob: bfdf4ef865609dcba46a8b298927bae811b7b4f8 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Illuminate\Contracts\Mail;
4
5use Illuminate\Contracts\Queue\Factory as Queue;
6
7interface Mailable
8{
9 /**
10 * Send the message using the given mailer.
11 *
12 * @param \Illuminate\Contracts\Mail\Factory|\Illuminate\Contracts\Mail\Mailer $mailer
13 * @return void
14 */
15 public function send($mailer);
16
17 /**
18 * Queue the given message.
19 *
20 * @param \Illuminate\Contracts\Queue\Factory $queue
21 * @return mixed
22 */
23 public function queue(Queue $queue);
24
25 /**
26 * Deliver the queued message after the given delay.
27 *
28 * @param \DateTimeInterface|\DateInterval|int $delay
29 * @param \Illuminate\Contracts\Queue\Factory $queue
30 * @return mixed
31 */
32 public function later($delay, Queue $queue);
33
34 /**
35 * Set the recipients of the message.
36 *
37 * @param object|array|string $address
38 * @param string|null $name
39 * @return self
40 */
41 public function cc($address, $name = null);
42
43 /**
44 * Set the recipients of the message.
45 *
46 * @param object|array|string $address
47 * @param string|null $name
48 * @return $this
49 */
50 public function bcc($address, $name = null);
51
52 /**
53 * Set the recipients of the message.
54 *
55 * @param object|array|string $address
56 * @param string|null $name
57 * @return $this
58 */
59 public function to($address, $name = null);
60
61 /**
62 * Set the locale of the message.
63 *
64 * @param string $locale
65 * @return $this
66 */
67 public function locale($locale);
68
69 /**
70 * Set the name of the mailer that should be used to send the message.
71 *
72 * @param string $mailer
73 * @return $this
74 */
75 public function mailer($mailer);
76}