WatchDirectory Forum
https://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> How to... >> Download link from e-mail
https://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1549966107

Message started by duck on Feb 12th, 2019 at 11:08am

Title: Download link from e-mail
Post by duck on Feb 12th, 2019 at 11:08am
Hello,
It's possible download an e-mail link and save the link attachment on the disk or network?
for example we receive a link on body with pdf file and save on my network.

Thanks

Title: Re: Download link from e-mail
Post by Gert on Feb 13th, 2019 at 11:25am
Hello Duck,

Use this as the body for the email:

Code (]
<html>
<body>
<p>
<a href="http://www.myserver.com/downloads/%WD_FILE_N%">click here for the new file</a>.
<p/>
</body>
</html>
[/code):

If the file is not available "on the web", but only through ftp, use something like this:
[code]
<html>
<body>
<p>
<a href="ftp://ftp.myserver.com/root/downloads/%WD_FILE_N%">click here for the new file</a>.
<p/>
</body>
</html>


The %WD_FILE_N% will be replaced by just the name of the file that was detected (hello.pdf).

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2019. All Rights Reserved.