Contract online

Formular de sponsorizare

Datele companiei tale

Datele reprezentantului legal

Persoană de contact

Detalii bancare

AddPage(); $pdf->SetFont('times', '', 12); $pdf->Cell(0, 10, 'Nume Companie: ' . $numeCompanie, 0, 1); $pdf->Cell(0, 10, 'CUI: ' . $cui, 0, 1); // ... // Salveaza PDF pe server $pdfPath = 'path/to/save/' . uniqid('contract_') . '.pdf'; $pdf->Output($pdfPath, 'F'); // Trimite e-mail cu PDF atasat $to = 'destinatar@email.com'; $subject = 'Contract Generat'; $message = 'Vezi documentul atasat.'; $headers = "From: sender@email.com\r\n"; $headers .= "Reply-To: sender@email.com\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: multipart/mixed; boundary=\"boundary\"\r\n"; $attachment = chunk_split(base64_encode(file_get_contents($pdfPath))); $headers .= "--boundary\r\n"; $headers .= "Content-Type: application/pdf; name=\"" . basename($pdfPath) . "\"\r\n"; $headers .= "Content-Transfer-Encoding: base64\r\n"; $headers .= "Content-Disposition: attachment\r\n\r\n"; $headers .= $attachment . "\r\n"; mail($to, $subject, $message, $headers); // Sterge PDF-ul dupa trimitere (opțional) unlink($pdfPath); } ?>