Help with sending emails with attached files #1292
Unanswered
valentesolucoes
asked this question in
Q&A
Replies: 2 comments 1 reply
-
@valentesolucoes try adding the |
Beta Was this translation helpful? Give feedback.
1 reply
-
@valentesolucoes you might have to attach each individual files seperately.
Mail::send('frontend::mail.attachments', $params, function ($message) use ($params) {
$message->to('me@gmail.com', '');
foreach($params['files'] as $file) {
$message->attach($file, ['as' => $file->getClientOriginalName()]);
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello friends,
I'm a little lost in the WinterCMS documentation, about how to attach files from a form on the Frontend by email. In this form, I can send several files (.pdf, .doc or .jpg).
In the Plugin that I created on the Backend, I receive the form data as follows:
My Frontend form:
However, when I process the attachment of files to the form and click submit, nothing happens. I believe that some parameter is missing.
Does anyone have an example of how to do this?
Beta Was this translation helpful? Give feedback.
All reactions