Jump to content

Search the Community

Showing results for tags 'doesnt send attachment'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi! I'm hoping someone can help me out with a HTML form using PHP. The form allows users to upload a file (and that part works) but it's supposed to attach that file in the email it sends with the form info. I've looked and looked and looked but I haven't been able to find a resolution. HELP!!! <?php $fileName = $_FILES["fileatt"]["name"]; // The file name $fileTmpLoc = $_FILES["fileatt"]["tmp_name"]; // File in the PHP tmp folder $fileType = $_FILES["fileatt"]["type"]; // The type of file it is $fileSize = $_FILES["fileatt"]["size"]; // File size in bytes $fileErrorMsg = $_FILES["fileatt"]["error"]; // 0 for false... and 1 for true move_uploaded_file($fileTmpLoc, "uploads/$fileName"); if (is_uploaded_file($fileatt)) { // Read the file to be attached ('rb' = read binary) $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); } $data = chunk_split(base64_encode($data)); $From = $_POST['From']; $Email = $_POST['Email']; $Campaign = $_POST['Campaign']; $Subject = $_POST['Subject']; $email_sub = "Email request confirmation"; $datepicker = $_POST['datepicker']; $Specialty = implode(', ', empty($_POST['Specialty']) ? array() : $_POST['Specialty'] ); $Template = $_POST['Template']; $url = 'http://lwwjournals.com/#calendar'; $Notes = $_POST['Notes']; $formcontent=" New Email Request from $Name \n \n --------------------------------------- \n \n From: $From \n Email: $Email \n Campaign: $Campaign \n Subject: $Subject \n Date: $datepicker \n Specialty: $Specialty \n Template: $Template \n Uploaded File: $fileName \n Notes: $Notes $data"; $formcontent2=" Hey there! Thanks for submitting your request, here's a copy of the information you submitted. \n \n --------------------------------------- \n \n From: $From \n Email: $Email \n Campaign: $Campaign \n Subject: $Subject \n Date: $datepicker \n Specialty: $Specialty \n Uploaded File: $fileName \n Template: $Template \n Notes: $Notes"; $recipient = "email@dummyemail.com"; $subject = "2013 Email Request"; mail($recipient, $subject, $formcontent,'From: emails@lwwjournals.com','-f emails@lwwjournals.com' ) or die("Error!"); mail($Email, $email_sub, $formcontent2,'From: emails@lwwjournals.com','-f emails@lwwjournals.com' ) or die("Error!"); echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">'; ?> index.html mail.php
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.