Link to home
Start Free TrialLog in
Avatar of john80988
john80988

asked on

add email attachment in smarty template and phpmailer

my site have a email script which have few file to perform a simple contact form submit, i suft the net but no clue on now to make it send theattachment, my eye was blur, experts please help.

2 html + 1 php file script as below

one is html file to display the form

<form name="contactusForm" enctype="multipart/form-data" action="{$url_https}p=contact_us" method="post" onsubmit="return CheckContactusForm(this)">            
....
<div class="field clearfix">
                        <label>Upload</label>
                        <input name="form[upload]" type="file" id="upload" />
</div>
...

one is php file to perform the sending script

function emailSupport($contact){
      global $settings;

      view()->assign("fname", $contact["fname"]);
      view()->assign("subject", $contact["subject"]);
      view()->assign("message", $contact["message"]);
        view()->assign("email"=>$contactus["email"], "name" => $contact["fname"]);
      send_mail("name@somename.com","Customer Inquiry",$message,$from, "html");
}
ASKER CERTIFIED SOLUTION
Avatar of Robert Saylor
Robert Saylor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial