“Kirim beberapa lampiran di Mail Laravel 8” Kode Jawaban

Lampirkan beberapa file di Laravel Mailable

public function build()
{
    $email = $this->view('emails.employment_mailview')->subject('Employment Application');

    // $attachments is an array with file paths of attachments
    foreach($attachments as $filePath){
        $email->attach($filePath);
    }
    return $email;
}
Graceful Goose

Kirim beberapa surat di Laravel

$emails = ['[email protected]', '[email protected]','[email protected]'];

Mail::send('emails.welcome', [], function($message) use ($emails)
{    
    $message->to($emails)->subject('This is test e-mail');    
});
var_dump( Mail:: failures());
exit;
Muddy Macaw

Laravel Mail kirim ke beberapa penerima

$arrayEmails = ['[email protected]','[email protected]'];
$emailSubject = 'My Subject';
$emailBody = 'Hello, this is my message content.';

Mail::send('emails.normal',
	['msg' => $emailBody],
	function($message) use ($arrayEmails, $emailSubject) {
		$message->to($arrayEmails)
        ->subject($emailSubject);
	}
);
Watcher O_O

Kirim beberapa lampiran di Mail Laravel 8

public function build()
{
        $this->subject('Mail from ItSolutionStuff.com')
                    ->view('emails.myTestMail');
  
        foreach ($this->details['files'] as $file){
            $this->attach($file);
        }
  
        return $this;
}
Hardik Savani

Jawaban yang mirip dengan “Kirim beberapa lampiran di Mail Laravel 8”

Pertanyaan yang mirip dengan “Kirim beberapa lampiran di Mail Laravel 8”

Lebih banyak jawaban terkait untuk “Kirim beberapa lampiran di Mail Laravel 8” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya