Attach file in formmail. (php formmail)
问题 I'm writing a mailform i php for placeing orders, and sense they have to get send a picture to me for the order to work properly, I'd like to be able to attach the file in the formmail. How shuld I do this? I have seen some different sulutions but non that I've complety understand. 回答1: You need to set the right mail-headers, and then attach the file by encoding it to whatever form you have declared in the header, like in this snippet: All you need to do here, is read the file, and encode it