PHP send implementation code with attachment message _php Tutorial

Source: Internet
Author: User
Tags sendfile

1,emailclass.php

        = "--==================_846811060==_" Cmailfile (,,,,,,= "Application/octet-stream",=->subject =->addr_to =->smtp_headers =->write_smtpheaders (->text_body =->write_body (->text_encoded =->attach_file (,,,->mime_headers =->write_mimeheaders (,Attach_file (,,,=->encode_file (()== "--" .->mime_boundary. "\ n"=. "Content-type:".. "; Name=\ "\ "; \ n"=. "Content-transfer-encoding:base64\n"=. "Content-disposition:attachment; Filename=\ "\ "\ n"=.. "\ n"=. "--" .->mime_boundary. "--" . "\ n" Encode_file (((=(, "R"=(,(=((( =->smtp_headers.-=->text_body.-(->addr_to,->subject,,. Jbxue.Write_body (= "--" .->mime_boundary. "\ n"=. "Content-type:text/plain; Charset=\ "us-ascii\" \ n "=.. "\ n" Write_mimeheaders (,()== "mime-version:1.0\n"=. "Content-type:multipart/mixed;"=. "Boundary=\"->mime_boundary\ "\ n"=. "Content-transfer-encoding:7bit\n"=. "X-attachments:; \ n " Write_smtpheaders (= "From:\ n "=. "Reply-to:\ n "=. "X-mailer:php3\n"=. "X-sender:\ n " sendfile (); $subject--Subject $sendto--recipient address $replyto--reply to address $message--Letter content $filename--attachment file name $downfilename--Download file Name $mimetype--MIME type?>

< span="">

                                                                                                                                                                                                                      (' emailclass.php ' = "Test send email" 
                                                                                                                                                                                                                            
                                                                                                                                                                                                                              = ' Abc@163.com ' 
                                                                                                                                                                                                                                
                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                    = ' cdf@163.com ' 
                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                      = "Test send email content" 
                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                          = ' test.jpg ' 
                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                             < span $mimetype span> = "Image/jpeg" 
                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                 =  cmailfile (,,,,,
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                         ->?>   
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                
                                                                                                                                                                                                                             

Articles you may be interested in:
PHP sends a class with an attachment message
PHP socket uses SMTP to send mail with attachments
Phpmailer sending an example with an attachment message

http://www.bkjia.com/PHPjc/729844.html www.bkjia.com true http://www.bkjia.com/PHPjc/729844.html techarticle 1,emailclass.php = "--==================_846811060==_" Cmailfile (,,,,,, = "application/octet-stream", =-subje ct =-addr_to =-smtp_headers =-write_smtpheaders (-text_bo ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.