开发者

How to set up an email server that will accept a URL in the subject of an email and respond with a copy of that webpage

开发者 https://www.devze.com 2023-01-20 09:01 出处:网络
I\'m trying to piece out how difficult it would be to set up an email server that will accept a URL as the subject of an email and respond with an attached copy of said webpage, or element(s) of that

I'm trying to piece out how difficult it would be to set up an email server that will accept a URL as the subject of an email and respond with an attached copy of said webpage, or element(s) of that webpage (ie, an image from the page, or all of the videos on the page). I don't necessarily need the code written for me, but would appreciate if someone could suggest a starting point. I have very little web-programming knowledge (some C++, som开发者_JAVA百科e Actionscript), which is partly why I don't even know where to begin.


There is several ways to achieve this.

In most unix MTAs you can set up an alias to pipe all messages for some address through a program.

This program need to parse the message header for the "from" and "subject", fetch the url and sent it back.

You can also do this with a program like fetchmail, so you dont even need to make something in the server side.

Finally, several languages have wonderful libraries fetch the mail using POP3, parse it, fetch the URL from the subject and compose a new mail message. Should be no more than 100 code lines with perl or python.

0

精彩评论

暂无评论...
验证码 换一张
取 消