Question

PHP email file attachments

Asked by: hegde123

Hi
   i'd like to know if anyone has the code to be able to attach and email excel files using PHP. Basicallywhat i have is a process that opens an excel file on a directory on a windows machine and writes data to the file. What i need is something that emails the excel file as an attachement at the end of this process. I can get the email process working where it emails a message, but am having trouble emailing attachments. I've attached the current email function.

function send_email($to,$from,$reply,$subject,$msg,$host,$port,$domain,$priority,$output)
    {
     if (!$host) { $host = ""; }
     if (!$port) { $port = "25"; }
     if (!$priority) { $priority = "1"; }
     if (!$reply) { $reply = $from; }

     $STATUS_OK = "2";
     $STATUS_DATA_OK = "3";
     $CRLF = "\r\n";

     // Pull out the simple email if they are putting in 'name <email@domain.com>'
     if (ereg("(([[:alnum:]]|\\-|\\.)+@([^[:space:]]*)([[:alnum:]-]))", $to, $reg_array))
         {
          $to = $reg_array[0];
         }

     if ($socket = fsockopen($host, $port))
         {
          list($status, $resp_msg) = each(read_response($socket,$output));
          if ($status == $STATUS_OK)
              {
               fputs($socket, "HELO" . $CRLF);
               list($status, $resp_msg) = each(read_response($socket,$output));

               if ($status == $STATUS_OK)
                   {
                    fputs($socket, "MAIL FROM:" . $from . $CRLF);
                    list($status, $resp_msg) = each(read_response($socket,$output));

                    if ($status == $STATUS_OK)
                        {
                         fputs($socket, "RCPT TO: " . $to . $CRLF);
                         list($status, $resp_msg) = each(read_response($socket,$output));
                         if ($status == $STATUS_OK)
                             {
                              fputs($socket, "DATA" . $CRLF);
                              list($status, $resp_msg) = each(read_response($socket,$output));

                              if ($status == $STATUS_DATA_OK)
                                  {
                                   $buffer = "From: $from$CRLF";
                                   $buffer .= "To: $to$CRLF";
                                   $buffer .= "Reply-To: $reply]$CRLF";
                                   $buffer .= "Errors-To: $reply$CRLF";
                                   $buffer .= "Bounce-To: $reply$CRLF";
                                   $buffer .= "X-Priority: $priority$CRLF";
                                   $buffer .= "X-Mailer: Zap Mailer w/PHP " . phpversion() . $CRLF;
                                   $buffer .= "Subject: $subject$CRLF";
                                   $buffer .= $CRLF;
                                   $buffer .= $msg;

                                   if ($output == "Y")
                                       {
                                        echo nl2br($buffer);
                                       }

                                   if (fputs($socket, $buffer . "$CRLF.$CRLF"))
                                       {
                                        list($status, $resp_msg) = each(read_response($socket,$output));

                                        if ($status == $STATUS_OK)
                                            {
                                             $send_success = true;
                                             fputs($socket, "QUIT" . $CRLF);
                                            }
                                       }
                                  }
                             }
                        }
                   }
              }
          fclose($socket);
         }
    }

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2002-10-30 at 17:30:56ID20386665
Tags

php

,

attachment

,

email

,

file

Topic

PHP Scripting Language

Participating Experts
3
Points
150
Comments
28

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. PHP Mailer
    How do I create a php mailer that uses a multi-lined text box to send multiple emails. For example, if in the multi-line text box, i write test@test.com test2@test.com test3@test.com test4@test.com how do I mail the emails seperately using PHP Form mailer? Thanks
  2. Kind of Urgent: PHP mailer difficulties
    Can't get PHP mailer script to work. If you're interested, I'll post the code.
  3. PHP E-Mailer
    Just finsihed a php e-mailer, everything works great, just have a few problems. When sending e-mails, it is sort of slow, is there a way you can speed up the proccess of sending the emails? When I send more then 150 emails, it states that, I have exceeded my daily limit, is...
  4. PHP Mailer
    Can someone please teach me on how to have a php mailer that will send emails to the inbox of my clients?

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: ykf2000Posted on 2002-10-30 at 17:40:07ID: 7390276

this article should help
http://codewalkers.com/seecode/98.html

 

by: hegde123Posted on 2002-10-30 at 17:44:14ID: 7390287

Hi
  Thanks for that but i've actually already had a try at that and it doesnt seem to work. For some reason it doesnt seem to attach the file. Should i be adding an extra parameter to my function using that or append it to the existing msg parameter?

 

by: ykf2000Posted on 2002-10-30 at 17:47:56ID: 7390296

why are u not using PHP's mail function? It is easier to add custom header like Content-Disposition which is critical to email attachments. See headers in

http://www.hollowearth.co.uk/tech/php/email_attachments.php

 

by: hegde123Posted on 2002-10-30 at 19:28:36ID: 7390561

Hi
  I've used the mail function and the email works with that, but when i use the attachemnt code which i've shown below, it seemd to echo that the file was sent, but i havent recieved an email while  if i omit the attachment part it works fine.

$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/mixed;\r\n";
$headers .= " boundary=\"".$mime_boundary."\"";

$fileatt = "C:\\Program Files\\Apache Group\\Apache\\htdocs\\rep_tickets_Section_Suppress_Credit_Report.xls";
$fileatt_type = "application/octet-stream";
$fileatt_name = "$xls_filename";

$file = fopen($fileatt,'rb');  
$data = fread($file,filesize($fileatt));  
fclose($file);  

$semi_rand = md5(time());  
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";  
   
$headers .= "\nMIME-Version: 1.0\n" .  
            "Content-Type: multipart/mixed;\n" .  
            " boundary=\"{$mime_boundary}\"";  

$email_message = "This is a multi-part message in MIME format.\n\n" .  
                "--{$mime_boundary}\n" .  
                "Content-Type:excel; charset=\"iso-8859-1\"\n" .  
               "Content-Transfer-Encoding: 7bit\n\n" .  
$email_message . "\n\n";  

 $data = chunk_split(base64_encode($data));  

$email_message .= "--{$mime_boundary}\n" .  
                  "Content-Type: {$fileatt_type};\n" .  
                  " name=\"{$fileatt_name}\"\n" .  
                  "Content-Disposition: attachment;\n" .
                  " filename=\"{$fileatt_name}\"\n" .
                  "Content-Transfer-Encoding: base64\n\n" .  
                 $data . "\n\n" .  
                  "--{$mime_boundary}--\n";  


$ok = @mail("akash.hegde@peopletelecom.com.au", "file by email", $email_message,$headers);

if($ok) {  
echo "<font face=verdana size=2>File sent</font>";  
} else {  
die("Sorry but the email could not be sent. Please go back and try again!");  
}  

 

by: ykf2000Posted on 2002-10-30 at 19:40:44ID: 7390592

can you remove @ from the mail function see if it returns any error?

 

by: hegde123Posted on 2002-10-30 at 20:05:54ID: 7390662

Tried that...did'nt recieve a error and it echoed "File sent". Any ideas?:)

 

by: VGRPosted on 2002-10-31 at 03:13:27ID: 7391544

yes. My functions for "email with attachments" do work indeed, but I found out myself this :

.
                 "Content-Transfer-Encoding: base64\n\n" .  
                $data . "\n\n" .  
                 
a blank line (\r\n for me) is NECESSARY before $data above

Second remark : could you try \r\n i.s.o. only \n for EoLn ?

 

by: hegde123Posted on 2002-10-31 at 14:00:47ID: 7394188

Tried that..still the same result. Here's the changed code:

$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/mixed;\r\n";
$headers .= " boundary=\"".$mime_boundary."\"";

$fileatt = "C:\\Program Files\\Apache Group\\Apache\\htdocs\\rep_tickets_Section_Suppress_Credit_Report.xls";
$fileatt_type = "application/octet-stream";
$fileatt_name = "$xls_filename";

$file = fopen($fileatt,'rb');  
$data = fread($file,filesize($fileatt));  
fclose($file);  

$semi_rand = md5(time());  
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";  
   
$headers .= "\r\nMIME-Version: 1.0\r\n" .  
            "Content-Type: multipart/mixed;\r\n" .  
            " boundary=\"{$mime_boundary}\"";  

$email_message = "This is a multi-part message in MIME format.\r\n\n" .  
                "--{$mime_boundary}\r\n" .  
                "Content-Type:excel; charset=\"iso-8859-1\"\r\n" .  
               "Content-Transfer-Encoding: 7bit\n\n" .  
$email_message . "\n\n";  

 $data = chunk_split(base64_encode($data));  

$email_message .= "--{$mime_boundary}\r\n" .  
                  "Content-Type: {$fileatt_type};\r\n" .  
                  " name=\"{$fileatt_name}\"\r\n" .  
                  "Content-Disposition: attachment;\r\n" .
                  " filename=\"{$fileatt_name}\"\r\n" .
                  "Content-Transfer-Encoding: base64\r\n" .  
                 $data . "\n\n" .  
                  "--{$mime_boundary}--\r\n";  


$ok = mail("akash.hegde@peopletelecom.com.au", "file by email", $email_message,$headers);

if($ok) {  
echo "<font face=verdana size=2>File sent</font>";  
} else {  
die("Sorry but the email could not be sent. Please go back and try again!");  
}  

 

by: VGRPosted on 2002-10-31 at 14:11:00ID: 7394229

Heuuu sorry but you still have no blank line before the $data in your $email_message variable...

 

by: hegde123Posted on 2002-10-31 at 15:29:51ID: 7394518

ops..sorry for that..but i tried it with that change and it still echoes "file sent" ut i recieve no email??

$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/mixed;\r\n";
$headers .= " boundary=\"".$mime_boundary."\"";

$fileatt = "C:\\Program Files\\Apache Group\\Apache\\htdocs\\rep_tickets_Section_Suppress_Credit_Report.xls";
$fileatt_type = "application/octet-stream";
$fileatt_name = "$xls_filename";

$file = fopen($fileatt,'rb');  
$data = fread($file,filesize($fileatt));  
fclose($file);  

$semi_rand = md5(time());  
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";  
   
$headers .= "\r\nMIME-Version: 1.0\r\n" .  
           "Content-Type: multipart/mixed;\r\n" .  
           " boundary=\"{$mime_boundary}\"";  

$email_message = "This is a multi-part message in MIME format.\r\n\n" .  
               "--{$mime_boundary}\r\n" .  
               "Content-Type:excel; charset=\"iso-8859-1\"\r\n" .  
              "Content-Transfer-Encoding: 7bit\n\n" .  
$email_message . "\n\n";  

$data = chunk_split(base64_encode($data));  

$email_message .= "--{$mime_boundary}\r\n" .  
                 "Content-Type: {$fileatt_type};\r\n" .  
                 " name=\"{$fileatt_name}\"\r\n" .  
                 "Content-Disposition: attachment;\r\n" .
                 " filename=\"{$fileatt_name}\"\r\n" .
                 "Content-Transfer-Encoding: base64\r\n" .  
                $data . "\n\n" .  
                 "--{$mime_boundary}--\r\n";  


$ok = mail("akash.hegde@peopletelecom.com.au", "file by email", $email_message,$headers);

if($ok) {  
echo "<font face=verdana size=2>File sent</font>";  
} else {  
die("Sorry but the email could not be sent. Please go back and try again!");  
}  

 

by: hegde123Posted on 2002-10-31 at 15:30:13ID: 7394519

$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/mixed;\r\n";
$headers .= " boundary=\"".$mime_boundary."\"";

$fileatt = "C:\\Program Files\\Apache Group\\Apache\\htdocs\\rep_tickets_Section_Suppress_Credit_Report.xls";
$fileatt_type = "application/octet-stream";
$fileatt_name = "$xls_filename";

$file = fopen($fileatt,'rb');  
$data = fread($file,filesize($fileatt));  
fclose($file);  

$semi_rand = md5(time());  
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";  
   
$headers .= "\r\nMIME-Version: 1.0\r\n" .  
           "Content-Type: multipart/mixed;\r\n" .  
           " boundary=\"{$mime_boundary}\"";  

$email_message = "This is a multi-part message in MIME format.\r\n\n" .  
               "--{$mime_boundary}\r\n" .  
               "Content-Type:excel; charset=\"iso-8859-1\"\r\n" .  
              "Content-Transfer-Encoding: 7bit\n\n" .  
$email_message . "\n\n";  

$data = chunk_split(base64_encode($data));  

$email_message .= "--{$mime_boundary}\r\n" .  
                 "Content-Type: {$fileatt_type};\r\n" .  
                 " name=\"{$fileatt_name}\"\r\n" .  
                 "Content-Disposition: attachment;\r\n" .
                 " filename=\"{$fileatt_name}\"\r\n" .
                 "Content-Transfer-Encoding: base64\r\n" .  

                $data . "\n\n" .  
                 "--{$mime_boundary}--\r\n";  


$ok = mail("akash.hegde@peopletelecom.com.au", "file by email", $email_message,$headers);

if($ok) {  
echo "<font face=verdana size=2>File sent</font>";  
} else {  
die("Sorry but the email could not be sent. Please go back and try again!");  
}  

 

by: CyberMatrixPosted on 2002-10-31 at 16:16:20ID: 7394629


Try if this will make any change:

$email_message .= "--{$mime_boundary}\r\n" .
             "Content-Type: {$fileatt_type};\r\n" .
             "Content-Transfer-Encoding: base64\r\n" .
             " name=\"{$fileatt_name}\"\r\n" .
             "Content-Disposition: attachment; filename=\"{$fileatt_name}\"\r\n\r\n" .

             $data . "\n\n" .
             "--{$mime_boundary}--\r\n";

 

by: hegde123Posted on 2002-10-31 at 16:21:23ID: 7394635

Tried that..still  no luck.:)

 

by: CyberMatrixPosted on 2002-10-31 at 16:28:51ID: 7394658


Try if this will make any change:

$email_message .= "--{$mime_boundary}\r\n" .
             "Content-Type: {$fileatt_type};\r\n" .
             "Content-Transfer-Encoding: base64\r\n" .
             " name=\"{$fileatt_name}\"\r\n" .
             "Content-Disposition: attachment; filename=\"{$fileatt_name}\"\r\n\r\n" .

             $data . "\n\n" .
             "--{$mime_boundary}--\r\n";

 

by: hegde123Posted on 2002-10-31 at 16:32:48ID: 7394675

isnt this the same change as your previous comment?

 

by: CyberMatrixPosted on 2002-10-31 at 16:39:46ID: 7394689


Try if this will make any change:

$email_message .= "--{$mime_boundary}\r\n" .
             "Content-Type: {$fileatt_type};\r\n" .
             "Content-Transfer-Encoding: base64\r\n" .
             " name=\"{$fileatt_name}\"\r\n" .
             "Content-Disposition: attachment; filename=\"{$fileatt_name}\"\r\n\r\n" .

             $data . "\n\n" .
             "--{$mime_boundary}--\r\n";

 

by: CyberMatrixPosted on 2002-10-31 at 16:50:02ID: 7394735


Yes seems like I sent it by mistake twice. Sorry.

If this will not correct it I will try to make a more intensive search for the solution tomorrow.

-CM

 

by: CyberMatrixPosted on 2002-10-31 at 16:51:45ID: 7394739


I sent my comment twice BUT do not confuse me with "VGR" who is also trying to help.

-CM

 

by: CyberMatrixPosted on 2002-10-31 at 16:53:35ID: 7394743


I sent my comment twice BUT do not confuse me with "VGR" who is also trying to help.

-CM

 

by: hegde123Posted on 2002-10-31 at 16:55:08ID: 7394746

thats kewl..still having the same problem. Does it work for you?

 

by: CyberMatrixPosted on 2002-10-31 at 18:59:47ID: 7395069


I went through the code and made a few changes to it. I tested it with an .xls and .zip file and the transfer went OK.

You had some things mixed up and some lines where they should not be. I reorganized the code a bit and made it also more friendly.

You will need to do just some small changes as to which file to transfer (path and name), but it should work also for you now.

Another thing: The text in the message body in the code below is in my example named formated_form.php Can be a simple txt file with some predefined PHP variable or without them, like for example this

-------------------------------
Dear Sir/Madam,

$var->fullname your Excel document for the company you represent $var->company is attached.

All information is included.

Best Regards
---------------------------------

Let me know if it is OK and what you think...

HERE IS THE CORRECTED AND WORKING CODE:

$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";

$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/mixed;\r\n";
$headers .= " boundary=\"".$mime_boundary."\"";
$headers .= "\r\nMIME-Version: 1.0\r\n" .
            "Content-Type: multipart/mixed;\r\n" .
            " boundary=\"{$mime_boundary}\"";

$fileatt = "test.xls";
$fileatt_type = "application/octet-stream";
$fileatt_name = "test.xls";

$file = fopen($fileatt,'rb');
$data = fread($file,filesize($fileatt));
fclose($file);
$data = chunk_split(base64_encode($data));


$email_message = "This is a multi-part message in MIME format.\r\n" .
                 "\r\n" .
                 "--".$mime_boundary."\r\n";

$email_message .= read_template("formated_form.php", $var);

$email_message .= "--{$mime_boundary}\r\n" .
                  "Content-Type: {$fileatt_type};\r\n" .
                  "Content-Transfer-Encoding: base64\r\n" .
                  "Content-Disposition: attachment; filename=\"{$fileatt_name}\"\r\n\r\n" .

                  $data . "\r\n" .
                  "--{$mime_boundary}--\r\n";



        mail("akash.hegde@peopletelecom.com.au", "file by email", $email_message,$headers);

 

by: hegde123Posted on 2002-10-31 at 19:42:09ID: 7395153

Hi
   i've tried the changed code and it still doesnt work but i've narrowed down to the problam at which i'm hoping you can help.  In the code

$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: multipart/mixed;\r\n";
$headers .= " boundary=\"".$mime_boundary."\"";
$headers .= "\r\nMIME-Version: 1.0\r\n" .
           "Content-Type: multipart/mixed;\r\n" .
           " boundary=\"{$mime_boundary}\"";

when i comment out the lines after the 1st line, it recognises the $headers variable and the email works.
example
$headers = "MIME-Version: 1.0\r\n";
and nothing else gts appended to the headers variable. The same problem applies to the $email_message  variable.
if i put the second line like
$headers .= "Content-Type: multipart/mixed;\r\n";

it fails. It doesnt seem to like the ".=" sign or something. Any help?

 

by: hegde123Posted on 2002-10-31 at 19:52:04ID: 7395178

actually its the /r/n that gives the problem. If i remove the /r/n, it recognises the $headers variable???

 

by: hegde123Posted on 2002-10-31 at 20:00:16ID: 7395197

it did send the email this time but there was no file attachment?? rather i got this encoded output as the email message..

This is a multi-part message in MIME format.

--==Multipart_Boundary_x62ccc5f9eea0b861fb02f5299e034d95x
eeee--==Multipart_Boundary_x62ccc5f9eea0b861fb02f5299e034d95x
Content-Type: application/octet-stream;
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="rep_tickets_Section_Suppress_Credit_Report.xls"

CQgIAAAAEAAAAAAABAIQAAAAAAAAAAgAQ1VTVE9NRVIEAgwAAAABAAAABABOQU1FBAIUAAAAAgAA
AAwAQU1PVU5UX09XSU5HBAIUAAAAAwAAAAwAUEFZTUVOVF9EQVRFBAIOAAAABAAAAAYAQU1PVU5U
BAIQAAAABQAAAAgAUEFZX1RZUEUEAg8AAQAAAAAABwAwMTAyNTc2BAIjAAEAAQAAABsAV2ludGVy
IEdsb3cgSW52ZXN0bWVudHMgUC9MBAIOAAEAAgAAAAYAMjY0Ljg2BAISAAEAAwAAAAoAMjkvMTEv
MjAwMQQCDwABAAQAAAAHAC0xNDAuNjgEAhMAAQAFAAAACwBDcmVkaXQgTm90ZQQCDwACAAAAAAAH
ADAxMDI1NzYEAiMAAgABAAAAGwBXaW50ZXIgR2xvdyBJbnZlc3RtZW50cyBQL0wEAg4AAgACAAAA
BgAyNjQuODYEAhIAAgADAAAACgAwNC8wMy8yMDAyBAINAAIABAAAAAUANDMuMzMEAhMAAgAFAAAA
CwBJbnZvaWNlIHJ1bgQCDwADAAAAAAAHADAxMDI1NzYEAiMAAwABAAAAGwBXaW50ZXIgR2xvdyBJ
bnZlc3RtZW50cyBQL0wEAg4AAwACAAAABgAyNjQuODYEAhIAAwADAAAACgAwMi8wNC8yMDAyBAIO
AAMABAAAAAYALTQzLjMzBAIPAAMABQAAAAcASm91cm5hbAQCDwAEAAAAAAAHADAxMDI1NzYEAiMA
BAABAAAAGwBXaW50ZXIgR2xvdyBJbnZ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GwBGT1VSIFNFQVNPTlMgSEVBTFRIQ0FS
RSBQL0wEAg0AVQACAAAABQAzMDEuMwQCEgBVAAMAAAAKADEyLzEwLzIwMDIEAg0AVQAEAAAABQAz
MDEuMwQCEwBVAAUAAAALAEludm9pY2UgcnVuBAIPAFYAAAAAAAcAMTAzMTEzOQQCKABWAAEAAAAg
AEFVU1RXSURFIEVMRUNUUklDQUwgU0VSVklDRVMgUC9MBAIMAFYAAgAAAAQAMy44NQQCEgBWAAMA
AAAKADEzLzA4LzIwMDIEAgwAVgAEAAAABAA1NTAwBAIPAFYABQAAAAcASm91cm5hbAQCDwBXAAAA
AAAHADEwMzExMzkEAigAVwABAAAAIABBVVNUV0lERSBFTEVDVFJJQ0FMIFNFUlZJQ0VTIFAvTAQC
DABXAAIAAAAEADMuODUEAhIAVwADAAAACgAxOC8wOC8yMDAyBAIMAFcABAAAAAQAMy44NQQCEwBX
AAUAAAALAEludm9pY2UgcnVuBAIPAFgAAAAAAAcAMTAzMTEzOQQCKABYAAEAAAAgAEFVU1RXSURF
IEVMRUNUUklDQUwgU0VSVklDRVMgUC9MBAIMAFgAAgAAAAQAMy44NQQCEgBYAAMAAAAKADAyLzA5
LzIwMDIEAhEAWAAEAAAACQAtMTA0MzIuMjUEAg8AWAAFAAAABwBKb3VybmFsBAIPAFkAAAAAAAcA
MTAzMTQzMQQCJgBZAAEAAAAeAFBIT1RPU1BSSU5UIEFVU1QuIChSRUMuIEFQUFREKQQCDQBZAAIA
AAAFADE3Ni4xBAISAFkAAwAAAAoAMjMvMTAvMjAwMgQCDQBZAAQAAAAFADE5LjM3BAITAFkABQAA
AAsASW52b2ljZSBydW4KAAAA

--==Multipart_Boundary_x62ccc5f9eea0b861fb02f5299e034d95x--


any ideas whats happening?

 

by: CyberMatrixPosted on 2002-11-01 at 01:55:19ID: 7395857


Did you use the code I sent you?

Your output is such because you commented the headers code or because you removed the \r\n.

It must work as I sent it the first time. I really cannot help you much as I do not experience your problem when I use the code.

Maybe you have some configuration error in the php.ini but that is just a guess.

Fact is that the above code I sent you does work so you'll have to check why the problem occurs only at you.

Let me know if you find out anything.

-CM

 

by: CyberMatrixPosted on 2002-11-01 at 02:05:49ID: 7395882


Just another thought:

I run PHP on a Linux machine.Maybe if you run it on Win some commands like for example \r\n are specified otherwise or any other in the $headers since there is where your problem is.

I am not sure since I never used PHP on Win.

-CM

 

by: hegde123Posted on 2002-11-01 at 03:08:36ID: 7396012

Thanks for that. I think its because i'm running it on windows.I'll give it another try.

 

by: CyberMatrixPosted on 2002-11-01 at 10:38:24ID: 7397590


I don't know from first hand experience but try and find out how to assign the $header and $email_message variables without using the '.' concatenation.

Than retry with that code.

Maybe it would be wise before applying it to the example I wrote above to test the code with another variable just to make sure that it really does without the '.' concatenation what it should when "creating" the/any such variable.


To be short... The variables should be specified without the concatenation and then you should retry it on Win.

Remember that the code above which I wrote you works. You
only need to find a solution to the concatenation so that you won't need to use it.

Maybe then it will work also on win.

 

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...