Sending image with phpmailer

0

I have a site that the form has to be authenticated, I'm using the phpmailer library, so far so good I have, however this form has a photo that must be sent along and I can not get this image to arrive in the box input. I used several examples that ni on the internet, like this $mail->addAttachment($_FILES['arquivo']); but did not work: /

    
asked by anonymous 15.02.2016 / 21:00

1 answer

-1

Try switching to $mail->addAttachment($_FILES['arquivo']['tmp_name']) .

I'm not sure how the addAttachment method works, but I do not think it was prepared to read the tmp_name key alone.     

16.02.2016 / 04:33