homepage Welcome to WebmasterWorld Guest from 23.22.29.137
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Email Autoresponder To ONLY .edu emails?
jakecarter




msg:4460429
 4:38 pm on Jun 1, 2012 (gmt 0)

Hi guys,
I'm trying to create an email auto responder that only sends an email if the student enters a specific .edu address. For our college, i'm trying to limit the information in the form to only people from our university.

For example, you go to the form and enter your address. It checks to make sure that the address is "name@university.edu"

If the mail address is a match, the the email autoresponder gets sent out to that person's email address.

Any suggestions as to how to do this? Thanks in advance!

 

lucy24




msg:4460521
 7:18 pm on Jun 1, 2012 (gmt 0)

I'm going to go out on a limb and say you can't do it in html alone. You're looking at php. Not very complicated php, but still. Or, in the alternative, put the whole page in a directory with restricted access that uses a campus e-mail as part of the login.

What if your students send e-mail from their off-campus home computers?

jakecarter




msg:4460552
 8:01 pm on Jun 1, 2012 (gmt 0)

PHP or javascript would work. Any idea how to go about that?

I have thought about them using other emails, but this is the only way that I can be sure that it is a student at the school.

Jonesy




msg:4460846
 12:51 am on Jun 3, 2012 (gmt 0)

You'd better worry about:

scholar@example.edu,lots-more@example.com,even-more@example.net
etc., etc.

Editing inputted emails addys ain't for the faint of heart.....

lucy24




msg:4460897
 11:40 am on Jun 3, 2012 (gmt 0)

Isn't there a built-in php function that does a lot of address-format screening with a couple of simple commands. (For, er, a given definition of "simple". I don't speak php, so the very sight of all those brackets give me the willies.) Though if you're constraining the address to a specific domain, it may actually be easier to write your own. Set it up negatively: if the address isn't in the exact form "name@example.edu" then put up an irritating little message.

Oh, and I just remembered that schools always give students an e-mail address. They may not choose to use it for everyday mail, but they do have it available. So that's not a worry.

rocknbil




msg:4461292
 4:58 pm on Jun 4, 2012 (gmt 0)

First, how are you creating this "auto responder?" A PHP example,

if (preg_match('/\.edu$/i',$the_cleansed_email_address)) {
// send the mail here
}
else { die("Invalid email address"); }

If you're doing this because it's getting spammed and you hope to stop it this way, it won't. Spammers can fake .edu email addresses too.

Tzakuk




msg:4462076
 3:03 pm on Jun 6, 2012 (gmt 0)

If you are only dealing with a single domain, you only need to have the client enter the local-part of their email address, and you provide the '@yourdomain.edu' This way there is no option for anyone to enter another domain name and there is no need to test.

If you are dealing with several domains, you could make a drop-down available for the user to select the appropriate domain from a list.

HTML:

<p>Enter your email user name</p>
<form method="post" action="yourMailScript.php">
<input type="text" name="name" size="64" />
<select name="domain">
<option value="somedomain.edu">somedomain.edu</option>
<option value="anotherdomain.edu">anotherdomain.edu</option>
</select>
<input type="submit" name="submit" value="send" />
</form>

This is the simplest solution I can think of. Hope it helps you.

[edited by: Tzakuk at 3:21 pm (utc) on Jun 6, 2012]

jakecarter




msg:4462078
 3:13 pm on Jun 6, 2012 (gmt 0)

Thanks guys, appreciate the suggestions!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved