简体   繁体   English

编写一个HTML代码来附加邮件中的文件

[英]Write an html code to attach a file in mail

I am trying to write an HTML Code which on clicking on one of the links a mail is sent to respective mail Id.But along with that mail i also want to attach an attachment by default.Uptill now i am able to pouplate rest of the fields like to,cc,bcc,sub but the only thing remained is attachment. 我正在尝试编写一个HTML代码,点击其中一个链接,邮件被发送到相应的邮件Id.But以及该邮件我也想要附加一个附件默认。现在我能够pouplate其余的字段喜欢,cc,bcc,sub但唯一剩下的就是附件。

Can anyone sort it out for me.Your help would be appreciated and thanks in advance. 任何人都可以为我解决。你的帮助将得到赞赏,并提前感谢。

Attachments are encoded in mail messages according to the MIME standard. 附件根据MIME标准在邮件消息中编码。 All the major web scripting languages have modules to read and write MIME messages. 所有主要的Web脚本语言都有用于读取和写入MIME消息的模块。 Searching for "MIME" at CPAN for instance will turn up lots of useful Perl code. 例如, 在CPAN上搜索“MIME”会产生大量有用的Perl代码。

I may be misunderstanding the question, but you're not going to be able to add an attachment to an email with HTML only . 我可能误解了这个问题,但您无法使用HTML向电子邮件添加附件。 You're going to need some server side code. 您将需要一些服务器端代码。

Are you trying to use mailto: to do this? 您是否尝试使用mailto:这样做?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM