Mail is sent without the attachment [closed]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 18:06:14

问题


I have this code, working it but mail is sent without attachment. Attachments in /files directory.

http://www.hawkee.com/snippet/1273/


回答1:


The script didn't attach the file. The correct way to do it is here: http://www.php.net/manual/en/function.mail.php#105661

Just implement this function in your script and it should work.




回答2:


I think your missing the point of the script. Yes it sends an email but it isn't meant to attach a file to the email. It is only supposed to upload the given file to a directory on the server it is on.

Creat a file contact.php and put the code from the --- contact.php --- then create a file contact_send.php and paste the code from --- contact_send.php ---. Just put on your server and just www.site.com/contact.php. the banners will be saved in the file FILES. please put in the contact_send.php on: $destinatar = "MAIL HERE"; your mail to lock like this: $destinatar = "mail@mailserver.com"; . Enjoy :D

He mentions here (in one way or another) that the file will be saved to

[SCRIPT LOCATION]/files/[FILE]


来源:https://stackoverflow.com/questions/13526850/mail-is-sent-without-the-attachment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!