Forum Moderators: phranque

Message Too Old, No Replies

Emailing a web page automatically

Emailing a web page automatically

         

MrMojoRisin

12:44 pm on Aug 8, 2004 (gmt 0)

10+ Year Member



Is there a way/script that would take a html page and email it to a list of subscribers? automatically once a day preferred.

thanks

lemat

1:29 pm on Aug 8, 2004 (gmt 0)

10+ Year Member



What kind of Operating System do you have?
What kind of SMTP server do you have?
If it's linux - try to use build in commands like "mail"

man mail
man cron

MrMojoRisin

1:34 pm on Aug 8, 2004 (gmt 0)

10+ Year Member



Debian linux and sendmail

are there commands for linux to grab a web page's source code? and then open a list of email addresses and send mail to them?

thanks

lemat

2:15 pm on Aug 8, 2004 (gmt 0)

10+ Year Member



wget [your_site...]

will create page.html file in current directory.

you can send this file using
cat page.html ¦ mail -s "a page" example@example.com

if you need to add more receipients put them in file receipients.txt, make an executable script named script.sh:

#!/bin/sh
cat page.html ¦ mail -s "a page" $1

and execute it:
cat receipients.txt¦xargs -n1 script.sh

try to search for yourself how to add a header Content-type: text/html to the message.

MrMojoRisin

4:21 pm on Aug 8, 2004 (gmt 0)

10+ Year Member



thanks