/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/local/bin/php <?php $to = $argv[1]; $subject = $argv[2]; $attachmentName = $argv[3]; Reply-To: [email protected]"; $headers .= " Content-Type: multipart/mixed; boundary=\"PHP-mixed-" . $messageBoundry . "\""; ?> --PHP-mixed-<?= $messageBoundry ?> Content-Type: multipart/alternative; boundary="PHP-alt-<?= $messageBoundry; ?>" --PHP-alt-<?=$messageBoundry?> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit --PHP-alt-<?= $messageBoundry ?> Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit <h3><?= $subject ?></h3> --PHP-alt-<?= $messageBoundry ?> <?= $subject ?> --PHP-mixed-<?= $messageBoundry ?> Content-Type: application/zip; name="<?= $attachmentName ?>" Content-Transfer-Encoding: base64 Content-Disposition: attachment <?= $attachment ?> --PHP-mixed-<?= $messageBoundry; ?> <?php ?>
URL: http://code.cshaiku.com/code_php_email_attachment.php