Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <����}im�
- $to = '[email protected]';
- $subject = 'Invoice';
- $random_hash = md5(date('r', time()));
- $headers = "From: [email protected]: [email protected]";
- $headers .= "rnContent-Type: multipart/mixed; boundary="PHP-mixed-".$random_hash.""";
- $body=rtrim(chunk_split(base64_encode($body)));
- //define the body of the message.
- ob_start(); //Turn on output buffering
- ?>
- --PHP-mixed-<?php echo $random_hash; ?>
- Content-Type: multipart/alternative; boundary="PHP-alt-<?php echo $random_hash; ?>"
- --PHP-alt-<?php echo $random_hash; ?>
- Content-Type: text/plain; charset="UTF-8"
- Content-Transfer-Encoding: 7bit
- Hello World!!!
- This is simple text email message.
- --PHP-alt-<?php echo $random_hash; ?>
- Content-Type: text/html; charset="UTF-8"
- Content-Transfer-Encoding: 7bit
- Text Emailu.
- --PHP-alt-<?php echo $random_hash; ?>--
- --PHP-mixed-<?php echo $random_hash; ?>
- Content-Type: text/html; charset="UTF-8"; name="faktura.html"
- Content-Transfer-Encoding: base64
- Content-Disposition: attachment
- <?php echo htmlentities($body); ?>
- --PHP-mixed-<?php echo $random_hash; ?>--
- <?php
- //copy current buffer contents into $message variable and delete current output buffer
- $message = ob_get_clean();
- //send the email
- $mail_sent = @mail( $to, $subject, $message, $headers );
Add Comment
Please, Sign In to add comment