Skip to content

Commit

Permalink
testing forwardEmail attachments fix 4
Browse files Browse the repository at this point in the history
  • Loading branch information
hrsa committed May 12, 2024
1 parent c259c39 commit 132eab1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
8 changes: 3 additions & 5 deletions app/Mail/ForwardEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@ public function content(): Content
public function attachments(): array
{
$attachments = [];

ray($this->inboundEmail->attachments())->label('attachments');
foreach ($this->inboundEmail->attachments() as $attachment) {
try {
$attachmentFileName = $attachment->getFilename();
$attachments[] = Attachment::fromData(fn() => $attachment, $attachment->getFilename());
} catch (\Exception $e) {
continue;
if ($attachmentFileName) {
$attachments[] = Attachment::fromData(fn () => $attachment, $attachmentFileName);
}
};

Expand Down
14 changes: 11 additions & 3 deletions resources/js/Components/EventGenerationTextArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,27 @@ const placeholderTexts: string[] = [
"Hotel Reservation Confirmation:\nGuest:\n- Name: Emily Johnson\n- Email: [email protected]\n- Phone: +1 (555) 987-6543\n\nReservation Details:\n- Check-in Date: June 20, 2024\n- Check-out Date: June 25, 2024\n- Number of Nights: 5\n- Room Type: Deluxe King Room\n- Number of Guests: 2\n- Special Requests: Non-smoking room, high floor\n\nHotel Information:\n- Hotel Name: Serenity Resort\n- Address: 123 Beachfront Avenue, Anytown, USA\n- Phone: +1 (555) 123-4567\n- Website: www.serenityresort.com",
"Appointment Confirmation:\n- Name: John Smith\n- Email: [email protected]\n- Phone: +1 (555) 123-4567\n\nAppointment Details:\n- Date: June 10, 2024\n- Time: 2:00 PM\n- Location: City Hall\n- Purpose: Property Tax Rebate",
"Concert Ticket Holder:\n- Name: Jane Smith\n- Email: [email protected]\n- Phone: +1 (555) 987-6543\n\nEvent Details:\n- Event: Summer Music Festival\n- Date: July 15, 2024\n- Time: 7:00 PM\n- Venue: Harmony Park Amphitheater\n- Location: Anytown, USA\n\nTicket Information:\n- Ticket Type: General Admission\n- Ticket Number: 123456789\n- Seat Number: N/A",
"Flight Details:\n- Departure Date: May 25, 2024\n- Departure Time: 10:00 AM\n- Departure Airport: JFK - John F. Kennedy International Airport\n- Arrival Date: May 30, 2024\n- Arrival Time: 3:00 PM\n- Arrival Airport: LAX - Los Angeles International Airport\n- Flight Number: XYZ123\n- Seat Number: 22A\n",
"Reminder to Self:\n Action: Schedule dentist appointment\nDate: May 15, 2024\nPriority: High\nLocation: Downtown Dental Clinic\nNote: Call to schedule appointment for annual check-up.",
"Flight details:\n- Departure Date: May 25, 2024\n- Departure Time: 10:00 AM\n- Departure Airport: JFK - John F. Kennedy International Airport\n- Arrival Date: May 30, 2024\n- Arrival Time: 3:00 PM\n- Arrival Airport: LAX - Los Angeles International Airport\n- Flight Number: XYZ123\n- Seat Number: 22A\n",
"Reminder to self: Schedule dentist appointment\nDate: May 15, 2024\nPriority: High\nLocation: Downtown Dental Clinic\nNote: Call to schedule appointment for annual check-up!",
"Hey there! How about dinner on Saturday? Let's meet at The Rustic Kitchen at 7:00 PM.\nAddress: 456 Oak Street, Anytown, USA.\nCan't wait to catch up!\n\nXOXO\nFred"
];
const index: number = Math.floor(Math.random() * placeholderTexts.length);
return placeholderTexts[index];
}
const currentPlaceholder = ref(getPlaceholder());
onMounted(() => {
setInterval(() => {
currentPlaceholder.value = getPlaceholder();
}, 5000)
})
</script>

<template>
<div class="relative w-full h-48">
<TextArea class="h-48 w-full resize-none text-lg placeholder:text-sm" :class="props.loading ? 'blur-lg' : ''"
:placeholder="getPlaceholder()"
:placeholder="currentPlaceholder"
v-model="model"/>
<div v-if="props.loading"
role="status" class="absolute -translate-x-1/2 -translate-y-1/2 top-2/4 left-1/2">
Expand Down

0 comments on commit 132eab1

Please sign in to comment.