Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Anyone know of an "email this to someone" cgi script?

Author
Message
Manic
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Completely off my face...
Posted: 14th Feb 2007 18:22 Edited at: 14th Feb 2007 18:59
I tried using formmail (if you've heard of it), but its set up to only allow emails to be sent to specified email addresses in the config file and i really don't know how to change it, or even if i can.

normally I'd just google this, but i don't know where to start.

any help would be warmly welcomed.

EDIT: this is what i'm using it for (only some of the videos exist/are up at the moment); http://www.graphicfilth.com/generation

cheers
Martin

I don't have a sig, live with it.
Zappo
Valued Member
20
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 14th Feb 2007 22:21 Edited at: 14th Feb 2007 22:21
There are many email scripts all over the Web. The most common are written in Perl or PHP. PHP is the easiest method as emails can be sent with a single command (if your Web host allows it):
http://www.php.net/manual/en/function.mail.php

I would certainly give a thought to it being abused though. Currently you let the user fill in anyones email address and write any message they like. They could stick in advertising, abuse, links to adult sites... anything. I would fix the message to be one of your choosing and I would force them to fill out their own valid email address too. Better still, make them register their details first so they are forced to give their details. Definately log their IP address so you stand a chance of tracing them if it does get abused.
Manic
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Completely off my face...
Posted: 15th Feb 2007 00:39
*sigh* so many things to think about...

I did find one CGI script that has some basic spam protection, but getting it working is a real headache.

I don't have a sig, live with it.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 15th Feb 2007 04:08
Are you refferring to sending an email to someone from a masked email? (Like using someone else's email as the sender field?)

If so, this batch file should do the trick:



Save it as a batch file (like email.bat), make sure to replace "mysmtp.myisp.com" with your isp provider's address and the field data at the top, then run the batch file and all should go well.


(Im pretty sure this isnt breaking any AUPs... yeah?)

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 15th Feb 2007 10:44
Two questions...

1. Why would posting some simple source code break the AUP?
and,
2. Why on earth are you using CGI? Everyone that I've spoken to who's used CGI then tried PHP have smacked themselves for ever using CGI in the first place...

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 15th Feb 2007 21:55
That looks like some weird form of ASP.

Manic
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Completely off my face...
Posted: 16th Feb 2007 11:25
Ruccus: what flavour of code is that?

Jess: sorry for using the wrong language! But seriously, I am just gonna switch it to PHP, as my uni tutor knows that and doesn't understand CGI either.

I don't have a sig, live with it.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 16th Feb 2007 16:29 Edited at: 16th Feb 2007 16:30
I only assumed it may be breaching the AUP because some people might think of it as a form of hacking (not sure how), as you can send emails using other people's emails, which I guess could be used to cause some havoc between people, if thats what you get your kicks from.

I picked it up from an old book I got for christmas, its been infront of my computer for ages and when I read the title I remembered this was in the book.

And the book might be called... the l337 h4xx0r h4ndb00k... which is why I asked about the AUP problem. *cough*.

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 17th Feb 2007 04:32
lol.
That code itself isn't malicous, but you're right, it could be used in the wrong way.
But, that's about the same as the 'Delete File' command In DB - not a harmful command, but could be used maliciously.

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 17th Feb 2007 08:21
CGI bins are being phazed out slowly over a few client servers ive worked with recently and more hosts are requiring you to tackle this in php or something ugly like asp.

I would check out this site before anything.
http://www.hotscripts.com/

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 17th Feb 2007 15:59
@Jess: how do you think that book I have hasnt been blacklisted by the FBI yet? The things you learn *could* do something... but the code itself wont .

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 17th Feb 2007 19:24
*Shrug*
If it's educational, and has at least some good information, then keep it

Nintendo DS & Dominos :: DS Dominos
http://jt0.org
Manic
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Completely off my face...
Posted: 17th Feb 2007 23:53
cheers for the input everyone, I made it with php in the end and removed the ability to add your own message.

the message that it does send needs to be more interestingly worded though, it basically reads like its spam. Perhaps I should add in a "their name" field to make it a bit more personalised.

If you're interested in what it says, send yourself an email, but please don't start just telling everyone just yet, its not anywhere close enough to finished to be truly public.

I don't have a sig, live with it.
GatorHex
19
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 18th Feb 2007 00:00
I wonder how long it will take for you ISP to dissable it

They realy are like a red flag to a bull. My ISP (1&1) has a scripting e-mail limit of like 10emails per hour, then they get queued up!

http://www.KumKie.com http://bulldog.servegame.com
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 18th Feb 2007 01:27 Edited at: 18th Feb 2007 01:28
Thats pretty harsh, ISP's will usually start paying attention when you get into the triple digits of message sends. 10? Ouch...

On a side note, I really recommend searching out the book (theyre all over the place, in any tech store pretty much), it covers the basics of computers in general (which can be boring) but once it gets past that, tapeworm (the author) starts into some really neat things.

Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 18th Feb 2007 01:34
I don't understand what the big deal is. Every time you email in a script, albeit PHP, ASP.NET, etc. you specify the FROM address. That's normal.

GatorHex
19
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 18th Feb 2007 02:06 Edited at: 18th Feb 2007 02:08
The problem is another clever coder can write a script to force an inexperienced coders script to act like a mail bomb. This spam then contains the header of your ISP and your ISP gets black listed.

I have complained that its too restrictive on a business account but they just reply install your own mail / cgi server

http://www.KumKie.com http://bulldog.servegame.com
Manic
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Completely off my face...
Posted: 19th Feb 2007 14:01
my hosting is through dreamhost and as far as I understand whatever activity my server has, just goes against my transfer quota, which is something stupid like 2000GB/Month, so it shouldn't make too big a dent.

I don't have a sig, live with it.

Login to post a reply

Server time is: 2024-11-18 06:34:29
Your offset time is: 2024-11-18 06:34:29