scotchegg78 Posted September 22, 2009 Share Posted September 22, 2009 Hi Guys I am trying to get the phpmailer class working with an image attachment from a html form. It works ( sort of) in that it sends an email with other form elements, but no working attachment. my html form is simply.. <input type="file" name="file" value=""/> and the aspect for the form is... $encoding = "base64"; $type = "application/octet-stream"; $mail->AddStringAttachment($_FILES['file']['tmp_name'],$_FILES['file']['name'],$encoding,$type); -update sorry i should of added i am using string method with the aim of not having to save the file to a server first from upload. If anyone else uses this phpmailer class, i would appreciate some advice. thanks Link to comment https://forums.phpfreaks.com/topic/175058-phpmailer-class-image-attachment/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.