Hotel Visa Hua Hin ((free)) • Fully Tested
if (!request[0]) return res.status(404).json( error: 'Request not found' ); // Configure email transporter const transporter = nodemailer.createTransport( service: 'gmail', auth: user: process.env.EMAIL_USER, pass: process.env.EMAIL_PASS ); // Send email await transporter.sendMail( from: '"Hua Hin Hotel" <hotel@huahin.com>', to: email, subject: 'Your Visa Support Letter for Thailand', text: 'Please find attached your visa support letter for your stay in Hua Hin.', attachments: [ filename: 'visa_support_letter.pdf', path: request[0].letter_file_path ] ); // Update status await db.query( 'UPDATE hotel_visa_requests SET visa_letter_status = "sent" WHERE id = ?', [req.params.request_id] ); res.json( success: true, message: 'Visa letter sent to guest email' ); catch (error) console.error(error); res.status(500).json( error: 'Failed to send email' );
.submit-btn:disabled opacity: 0.7; cursor: not-allowed;
to transform: translateY(0); opacity: 1; hotel visa hua hin
.visa-header text-align: center; color: white; margin-bottom: 30px;
res.json( success: true, message: 'Visa letter generated successfully', letter_url: pdfPath, request_id: result.insertId ); auth: user: process.env.EMAIL_USER
.form-group label display: block; margin-bottom: 8px; font-weight: 600; color: #333;
.info-box li margin: 5px 0; color: #555; pass: process.env.EMAIL_PASS )
if (!hotel) return res.status(404).json( error: 'Hotel not found' );