Jump to content
  • Advertisement
Sign in to follow this  
d000hg

[web] Sending email from data in a webpage

This topic is 4879 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm going to make my demos launch a web page when the player quits. This will have spaces for comments etc as an effort to improve my ratio of downloads to feedback. I want it so when a user clicks the "Send" button, an email is sent. This should contain the comment text as the body, a subject specified in the html, and attach a log file (name specified in the html). I don't really want it to use Outlook etc if that's possible, but it can't use ASP etc since the page is on the local machine. My web programming skills are too rusty - is there some simple javascript I can use to respond to a button press, which reads values from fields on the page and sends an email? I did know this stuff once so it doesn't need a baby-level explanation, just a couple of quick pointers...!

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure, but I think your best bet is connecting to a remote internet page that provides sending mail functionality. Send the data entered by the user and anything else along to that page.

Share this post


Link to post
Share on other sites
d000hg,

If you do it the way rick suggested, you need a script called Formmail. You can download it here:

http://www.scriptarchive.com/formmail.html

It will email the contents of a completed form to you, but it needs to be running on a server.

Andy

Share this post


Link to post
Share on other sites
Looks good but too long to implement :(

Can someone suggest how to do this on the client side using Java and a mailto: link. I guess using Outlook etc isn't too bad.

Share this post


Link to post
Share on other sites
you can do it really easily in PHP with the mail() function. not sure about the client side though. with regards to the mailto: option, you can add info to the link so that it will fill in the subject and email body etc. this explains how.

I would reconsider launching a webpage when you quit the game though. That sort of thing is one of my pate hates. Maybe provide a link within the quit screen instead.

Share this post


Link to post
Share on other sites
You can do it with a formmailer like that (or a far simpler one) but what's the point? If the user can connect to the remote site to deliver the email then you can also launch a remote page directly and host the mail form on your own webpage. I suggest using the mailto: method or even simply plastering your URL and e-mail address on a simple splash screen. Much less intrusive then popping up a webpage.

Oh, and if you do pop up a webpage, be kind enough to check what the default browser is in the registry. The one thing I have more that popup webpages are the one's that force it in IE.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!